aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/letv.py
diff options
context:
space:
mode:
Diffstat (limited to 'youtube_dl/extractor/letv.py')
-rw-r--r--youtube_dl/extractor/letv.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/youtube_dl/extractor/letv.py b/youtube_dl/extractor/letv.py
index 85eee141b..1484ac0d2 100644
--- a/youtube_dl/extractor/letv.py
+++ b/youtube_dl/extractor/letv.py
@@ -88,12 +88,13 @@ 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')
+ media_id, 'Downloading playJson data')
# Check for errors
playstatus = play_json['playstatus']