aboutsummaryrefslogtreecommitdiffstats
path: root/youtube
diff options
context:
space:
mode:
Diffstat (limited to 'youtube')
-rw-r--r--youtube/common.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube/common.py b/youtube/common.py
index 0a53c51..655f24c 100644
--- a/youtube/common.py
+++ b/youtube/common.py
@@ -169,12 +169,12 @@ def fetch_url(url, headers=(), timeout=15, report_text=None, data=None, cookie_j
start_time = time.time()
req = urllib.request.Request(url, data=data, headers=headers)
- if cookie_jar_send:
+ if cookie_jar_send is not None:
cookie_jar_send.add_cookie_header(req)
response = urllib.request.urlopen(req, timeout=timeout)
response_time = time.time()
- if cookie_jar_receive:
+ if cookie_jar_receive is not None:
cookie_jar_receive.extract_cookies(response, req)
content = response.read()