From 89daa27be257c6170e7d730529bee9ce1294f73d Mon Sep 17 00:00:00 2001 From: James Taylor Date: Tue, 26 Feb 2019 17:15:51 -0800 Subject: prevent urllib3 from decoding content --- youtube/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube/util.py b/youtube/util.py index e0f4a2c..9950815 100644 --- a/youtube/util.py +++ b/youtube/util.py @@ -149,7 +149,7 @@ def fetch_url(url, headers=(), timeout=15, report_text=None, data=None, cookieja else: # Use a urllib3 pool. Cookies can't be used since urllib3 doesn't have easy support for them. pool = get_pool(use_tor and settings.route_tor) - response = pool.request(method, url, headers=headers, timeout=timeout, preload_content=False) + response = pool.request(method, url, headers=headers, timeout=timeout, preload_content=False, decode_content=False) response_time = time.time() content = response.read() -- cgit v1.2.3