import urllib3 from requests.packages

This commit is contained in:
Mike Fährmann
2019-05-04 16:01:36 +02:00
parent c68461026a
commit 5fd94c6b83

View File

@@ -405,13 +405,9 @@ http.cookiejar.MozillaCookieJar.magic_re = re.compile(
# Update default cipher list of urllib3 < 1.25 # Update default cipher list of urllib3 < 1.25
# to fix issues with Cloudflare and, by extension, Artstation (#227) # to fix issues with Cloudflare and, by extension, Artstation (#227)
try: import requests.packages.urllib3 as urllib3 # noqa
import urllib3 if urllib3.__version__ < "1.25":
except ImportError: from requests.packages.urllib3.util import ssl_
pass
else:
if urllib3.__version__ < "1.25":
from urllib3.util import ssl_
logging.getLogger("gallery-dl").debug( logging.getLogger("gallery-dl").debug(
"updating default urllib3 ciphers") "updating default urllib3 ciphers")
# cipher list taken from urllib3 1.25 # cipher list taken from urllib3 1.25