Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ricecooker/classes/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
from ricecooker.utils.zip import create_predictable_zip

# Cache for filenames
FILECACHE = FileCache(config.FILECACHE_DIRECTORY, use_dir_lock=True, forever=True)
FILECACHE = FileCache(config.FILECACHE_DIRECTORY, forever=True)
HTTP_CAUGHT_EXCEPTIONS = (
HTTPError,
ConnectionError,
Expand Down
3 changes: 1 addition & 2 deletions ricecooker/utils/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@
DOWNLOAD_SESSION = requests.Session() # Session for downloading content from urls
DOWNLOAD_SESSION.mount("https://", requests.adapters.HTTPAdapter(max_retries=3))
DOWNLOAD_SESSION.mount("file://", FileAdapter())
# use_dir_lock works with all filesystems and OSes
cache = FileCache(".webcache", use_dir_lock=True)
cache = FileCache(".webcache")
forever_adapter = CacheControlAdapter(heuristic=CacheForeverHeuristic(), cache=cache)

# we can't use requests caching for pyppeteer / phantomjs, so track those separately.
Expand Down
2 changes: 1 addition & 1 deletion ricecooker/utils/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

# create a default session with basic caching mechanisms (similar to what a browser would do)
sess = requests.Session()
cache = FileCache(".webcache", use_dir_lock=True)
cache = FileCache(".webcache")
basic_adapter = CacheControlAdapter(cache=cache)
sess.mount("http://", basic_adapter)
sess.mount("https://", basic_adapter)
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
"selenium==4.25.0",
"yt-dlp==2024.11.18",
"html5lib",
"cachecontrol==0.12.11",
"lockfile==0.12.2", # This is needed, but not specified as a dependency by cachecontrol
"cachecontrol==0.14.1",
"filelock==3.16.1", # This is needed, but not specified as a dependency by cachecontrol
"css-html-js-minify==2.5.5",
"pypdf2==1.26.0",
"dictdiffer>=0.8.0",
Expand Down