mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-12 22:25:44 -04:00
check if COOKIE_FILE is file
This commit is contained in:
parent
68326a60ee
commit
fe11e1c2f4
1 changed files with 1 additions and 1 deletions
|
@ -174,7 +174,7 @@ def download_url(url: str, timeout: int=None) -> str:
|
|||
timeout = timeout or TIMEOUT
|
||||
|
||||
cookie_jar = http.cookiejar.MozillaCookieJar()
|
||||
if COOKIES_FILE is not None:
|
||||
if COOKIES_FILE and Path(COOKIES_FILE).is_file():
|
||||
cookie_jar.load(COOKIES_FILE, ignore_discard=True, ignore_expires=True)
|
||||
else:
|
||||
cookie_jar = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue