0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-24 02:35:12 +00:00

[Letv] Fix test_Letv and test_Letv_1 failures in python 3

This commit is contained in:
Yen Chi Hsuan 2015-03-03 23:17:19 +08:00
parent 7fde87c77d
commit 63fc800057

View file

@ -88,9 +88,10 @@ def _real_extract(self, url):
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')