mirror of
https://github.com/yt-dlp/yt-dlp
synced 2024-12-26 21:59:08 +01:00
[duboku] Fix extracting m3u8
This commit is contained in:
parent
6fef824025
commit
59cbba8cc8
1 changed files with 5 additions and 1 deletions
|
@ -136,6 +136,10 @@ class DubokuIE(InfoExtractor):
|
|||
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).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 +157,7 @@ class DubokuIE(InfoExtractor):
|
|||
'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