mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-19 01:37:50 +01:00
Merge branch 'fix-iqiyi-2015-07-17' of https://github.com/sceext2/youtube_dl into sceext2-fix-iqiyi-2015-07-17
This commit is contained in:
commit
fb8bc3f818
@ -212,20 +212,7 @@ def get_raw_data(self, tvid, video_id, enc_key, _uuid):
|
|||||||
return raw_data
|
return raw_data
|
||||||
|
|
||||||
def get_enc_key(self, swf_url, video_id):
|
def get_enc_key(self, swf_url, video_id):
|
||||||
filename, _ = os.path.splitext(url_basename(swf_url))
|
enc_key = '8e29ab5666d041c3a1ea76e06dabdffb'
|
||||||
enc_key_json = self._downloader.cache.load('iqiyi-enc-key', filename)
|
|
||||||
if enc_key_json is not None:
|
|
||||||
return enc_key_json[0]
|
|
||||||
|
|
||||||
req = self._request_webpage(
|
|
||||||
swf_url, video_id, note='download swf content')
|
|
||||||
cn = req.read()
|
|
||||||
cn = zlib.decompress(cn[8:])
|
|
||||||
pt = re.compile(b'MixerRemote\x08(?P<enc_key>.+?)\$&vv')
|
|
||||||
enc_key = self._search_regex(pt, cn, 'enc_key').decode('utf8')
|
|
||||||
|
|
||||||
self._downloader.cache.store('iqiyi-enc-key', filename, [enc_key])
|
|
||||||
|
|
||||||
return enc_key
|
return enc_key
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
|
Loading…
Reference in New Issue
Block a user