diff options
author | James Taylor <user234683@users.noreply.github.com> | 2018-12-26 18:27:15 -0800 |
---|---|---|
committer | James Taylor <user234683@users.noreply.github.com> | 2018-12-26 18:27:15 -0800 |
commit | 90f19d2d5bfa767e55499c561950f2cafce66ecd (patch) | |
tree | ac1944b30e23c4d2f2f56546ff7ef9465a339a0a /youtube/common.py | |
parent | 2b4b5e284c3b8ceac2127be45e9d534bbe3d1f5e (diff) | |
download | yt-local-90f19d2d5bfa767e55499c561950f2cafce66ecd.tar.lz yt-local-90f19d2d5bfa767e55499c561950f2cafce66ecd.tar.xz yt-local-90f19d2d5bfa767e55499c561950f2cafce66ecd.zip |
Rename cookie_jar to cookiejar
Diffstat (limited to 'youtube/common.py')
-rw-r--r-- | youtube/common.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/youtube/common.py b/youtube/common.py index c668292..59d757c 100644 --- a/youtube/common.py +++ b/youtube/common.py @@ -171,11 +171,11 @@ def decode_content(content, encoding_header): content = gzip.decompress(content) return content -def fetch_url(url, headers=(), timeout=15, report_text=None, data=None, cookie_jar_send=None, cookie_jar_receive=None, use_tor=True): +def fetch_url(url, headers=(), timeout=15, report_text=None, data=None, cookiejar_send=None, cookiejar_receive=None, use_tor=True): ''' - When cookie_jar_send is set to a CookieJar object, + When cookiejar_send is set to a CookieJar object, those cookies will be sent in the request (but cookies in response will not be merged into it) - When cookie_jar_receive is set to a CookieJar object, + When cookiejar_receive is set to a CookieJar object, cookies received in the response will be merged into the object (nothing will be sent from it) When both are set to the same object, cookies will be sent from the object, and response cookies will be merged into it. @@ -194,7 +194,7 @@ def fetch_url(url, headers=(), timeout=15, report_text=None, data=None, cookie_j req = urllib.request.Request(url, data=data, headers=headers) - cookie_processor = HTTPAsymmetricCookieProcessor(cookiejar_send=cookie_jar_send, cookiejar_receive=cookie_jar_receive) + cookie_processor = HTTPAsymmetricCookieProcessor(cookiejar_send=cookiejar_send, cookiejar_receive=cookiejar_receive) if use_tor and settings.route_tor: opener = urllib.request.build_opener(sockshandler.SocksiPyHandler(socks.PROXY_TYPE_SOCKS5, "127.0.0.1", 9150), cookie_processor) |