aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2019-02-26 17:15:51 -0800
committerJames Taylor <user234683@users.noreply.github.com>2019-02-26 17:15:51 -0800
commit89daa27be257c6170e7d730529bee9ce1294f73d (patch)
treed456b60a28d3b99955ad9cc33a06d97aa9649d5c
parent1e1f55c9e5d98ba076bc67e7abe9e4d77d84c65b (diff)
downloadyt-local-89daa27be257c6170e7d730529bee9ce1294f73d.tar.lz
yt-local-89daa27be257c6170e7d730529bee9ce1294f73d.tar.xz
yt-local-89daa27be257c6170e7d730529bee9ce1294f73d.zip
prevent urllib3 from decoding content
-rw-r--r--youtube/util.py2
1 files changed, 1 insertions, 1 deletions
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()