mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-03-09 12:50:23 -05:00
Merge 227277217b
into 05c8023a27
This commit is contained in:
commit
83f4b2575c
1 changed files with 8 additions and 1 deletions
|
@ -136,6 +136,13 @@ def _real_extract(self, url):
|
|||
elif player_encrypt == 2:
|
||||
data_url = urllib.parse.unquote(base64.b64decode(data_url).decode('ascii'))
|
||||
|
||||
sign_url = 'https://w.duboku.io/static/player/vidjs25.php'
|
||||
sign_html = self._download_webpage(sign_url, video_id)
|
||||
sign = re.search(r'encodeURIComponent\(\'(.*)\'\);', sign_html)
|
||||
if not sign:
|
||||
raise ExtractorError('Cannot find sign in player')
|
||||
sign = sign.group(1)
|
||||
|
||||
# if it is an embedded iframe, maybe it's an external source
|
||||
headers = {'Referer': webpage_url}
|
||||
if player_data.get('from') == 'iframe':
|
||||
|
@ -153,7 +160,7 @@ def _real_extract(self, url):
|
|||
'episode_id': episode_id,
|
||||
}
|
||||
|
||||
formats = self._extract_m3u8_formats(data_url, video_id, 'mp4', headers=headers)
|
||||
formats = self._extract_m3u8_formats(data_url, video_id, 'mp4', query={'sign': sign}, headers=headers)
|
||||
|
||||
return {
|
||||
'id': video_id,
|
||||
|
|
Loading…
Reference in a new issue