mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-23 03:02:50 +01:00
ignore case of cookiejar magic strings
This commit is contained in:
parent
808f67ba7d
commit
55f048d02b
@ -9,6 +9,7 @@
|
||||
"""Common classes and constants used by extractor modules."""
|
||||
|
||||
import os
|
||||
import re
|
||||
import time
|
||||
import netrc
|
||||
import queue
|
||||
@ -186,6 +187,13 @@ def safe_request(session, url, method="GET", *args, **kwargs):
|
||||
return r
|
||||
|
||||
|
||||
# Reduce strictness of the expected magic string in cookie jar files.
|
||||
# (This allows the use of Wget-generated cookiejar files without modification)
|
||||
|
||||
http.cookiejar.MozillaCookieJar.magic_re = re.compile(
|
||||
"#( Netscape)? HTTP Cookie File", re.IGNORECASE)
|
||||
|
||||
|
||||
# The first import of requests happens inside this file.
|
||||
# If we are running on Windows and the from requests expected certificate file
|
||||
# is missing (which happens in a standalone executable from py2exe), the
|
||||
|
Loading…
Reference in New Issue
Block a user