diff options
Diffstat (limited to 'youtube/util.py')
-rw-r--r-- | youtube/util.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube/util.py b/youtube/util.py index 05f78b9..be600bf 100644 --- a/youtube/util.py +++ b/youtube/util.py @@ -344,7 +344,7 @@ def fetch_url(url, headers=(), timeout=15, report_text=None, data=None, ip = ip.group(1).decode('ascii') if ip else None if not ip: ip = re.search(r'IP=((?:\d+\.)+\d+)', - response.getheader('Set-Cookie')) + response.getheader('Set-Cookie') or '') ip = ip.group(1) if ip else None # don't get new identity if we're not using Tor |