]> git.lizzy.rs Git - nhentai.git/blobdiff - nhentai/utils.py
Merge pull request #214 from lleene/master
[nhentai.git] / nhentai / utils.py
index dd74e6690dbd096b5c62509368d913df1f0c63ef..3364d0d4b675b40b6a13141d47bf9cb170dd18c0 100644 (file)
@@ -20,7 +20,11 @@ def request(method, url, **kwargs):
         'User-Agent': 'nhentai command line client (https://github.com/RicterZ/nhentai)',
         'Cookie': constant.CONFIG['cookie']
     })
-    return getattr(session, method)(url, proxies=constant.CONFIG['proxy'], verify=False, **kwargs)
+
+    if not kwargs.get('proxies', None):
+        kwargs['proxies'] = constant.CONFIG['proxy']
+
+    return getattr(session, method)(url, verify=False, **kwargs)
 
 
 def check_cookie():