mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2024-11-10 06:34:16 +00: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…
Reference in a new issue