Skip to content

Commit

Permalink
[ie/bilibili] Fix extractor
Browse files Browse the repository at this point in the history
  • Loading branch information
kclauhk committed Dec 2, 2024
1 parent 39bb89b commit 93421fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions yt_dlp/extractor/bilibili.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def _get_subtitles(self, video_id, cid, aid=None):
}

video_info = self._download_json(
'https://api.bilibili.com/x/player/v2', video_id,
'https://api.bilibili.com/x/player/wbi/v2', video_id,
query={'aid': aid, 'cid': cid} if aid else {'bvid': video_id, 'cid': cid},
note=f'Extracting subtitle info {cid}', headers=self._HEADERS)
if traverse_obj(video_info, ('data', 'need_login_subtitle')):
Expand All @@ -206,7 +206,7 @@ def _get_subtitles(self, video_id, cid, aid=None):

def _get_chapters(self, aid, cid):
chapters = aid and cid and self._download_json(
'https://api.bilibili.com/x/player/v2', aid, query={'aid': aid, 'cid': cid},
'https://api.bilibili.com/x/player/wbi/v2', aid, query={'aid': aid, 'cid': cid},
note='Extracting chapters', fatal=False, headers=self._HEADERS)
return traverse_obj(chapters, ('data', 'view_points', ..., {
'title': 'content',
Expand Down

0 comments on commit 93421fc

Please sign in to comment.