projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7fde87c
)
[Letv] Fix test_Letv and test_Letv_1 failures in python 3
author
Yen Chi Hsuan
<yan12125@gmail.com>
Tue, 3 Mar 2015 15:17:19 +0000
(23:17 +0800)
committer
Yen Chi Hsuan
<yan12125@gmail.com>
Tue, 3 Mar 2015 15:20:55 +0000
(23:20 +0800)
youtube_dl/extractor/letv.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/letv.py
b/youtube_dl/extractor/letv.py
index 85eee141b119519e9a6aac9a2fd8bfb1e05419a0..9ed81a1992acc8e527844e0242e6392abe37884f 100644
(file)
--- 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 = 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')
play_json = self._download_json(
play_json_req,
media_id, 'playJson data')