diff --git a/yt_dlp/extractor/duboku.py b/yt_dlp/extractor/duboku.py index 68c3f05731..43a5e5f2c2 100644 --- a/yt_dlp/extractor/duboku.py +++ b/yt_dlp/extractor/duboku.py @@ -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,