aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/YoutubeDL.py
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2015-10-18 22:32:10 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2015-10-18 22:32:10 +0800
commit4285a47f4065037a00693838c0297bfee3fc22eb (patch)
treee6707ac5e3f99b60ccd531e2b883db67a293426b /youtube_dl/YoutubeDL.py
parente36963e0eb57294f156a98c38df891dec41ebaa4 (diff)
parent05a3879f1c142cc2bf0287cde4690d8ccadcdc8f (diff)
Merge pull request #7208 from yan12125/letv-fix
[Letv] Fix extraction
Diffstat (limited to 'youtube_dl/YoutubeDL.py')
-rwxr-xr-xyoutube_dl/YoutubeDL.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
index adf70d658..12977bf80 100755
--- a/youtube_dl/YoutubeDL.py
+++ b/youtube_dl/YoutubeDL.py
@@ -37,6 +37,7 @@ from .compat import (
compat_tokenize_tokenize,
compat_urllib_error,
compat_urllib_request,
+ compat_urllib_request_DataHandler,
)
from .utils import (
ContentTooShortError,
@@ -1967,8 +1968,9 @@ class YoutubeDL(object):
debuglevel = 1 if self.params.get('debug_printtraffic') else 0
https_handler = make_HTTPS_handler(self.params, debuglevel=debuglevel)
ydlh = YoutubeDLHandler(self.params, debuglevel=debuglevel)
+ data_handler = compat_urllib_request_DataHandler()
opener = compat_urllib_request.build_opener(
- proxy_handler, https_handler, cookie_processor, ydlh)
+ proxy_handler, https_handler, cookie_processor, ydlh, data_handler)
# Delete the default user-agent header, which would otherwise apply in
# cases where our custom HTTP handler doesn't come into play