diff options
author | Sergey M. <dstftw@gmail.com> | 2015-03-17 19:58:34 +0600 |
---|---|---|
committer | Sergey M. <dstftw@gmail.com> | 2015-03-17 19:58:34 +0600 |
commit | cf47794f09ca13bfb16acc0903f13530a3f2d0f8 (patch) | |
tree | 17f1db8d9a257f7a924781756ca2f80b9f88c929 /youtube_dl | |
parent | c06a9f8730f41fb24835d482114403f227bc8421 (diff) | |
parent | 63fc80005782430180ed0d13ac6ab5ca497d333a (diff) | |
download | youtube-dl-cf47794f09ca13bfb16acc0903f13530a3f2d0f8.tar.xz |
Merge pull request #5116 from yan12125/letv_fix
[Letv] Fix test_Letv and test_Letv_1 failures in python 3
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/letv.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/youtube_dl/extractor/letv.py b/youtube_dl/extractor/letv.py index 85eee141b..9ed81a199 100644 --- a/youtube_dl/extractor/letv.py +++ b/youtube_dl/extractor/letv.py @@ -88,9 +88,10 @@ class LetvIE(InfoExtractor): play_json_req = compat_urllib_request.Request( 'http://api.letv.com/mms/out/video/playJson?' + compat_urllib_parse.urlencode(params) ) - play_json_req.add_header( - 'Ytdl-request-proxy', - self._downloader.params.get('cn_verification_proxy')) + cn_verification_proxy = self._downloader.params.get('cn_verification_proxy') + if cn_verification_proxy: + play_json_req.add_header('Ytdl-request-proxy', cn_verification_proxy) + play_json = self._download_json( play_json_req, media_id, 'playJson data') |