mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-04 08:29:57 +01:00
[extractor/BiliIntl] Fix subtitle extraction
Closes #4359 Authored by: MinePlayersPE
This commit is contained in:
parent
2aab569f1c
commit
fbb888a3d5
@ -795,12 +795,14 @@ def json2srt(self, json):
|
|||||||
|
|
||||||
def _get_subtitles(self, *, ep_id=None, aid=None):
|
def _get_subtitles(self, *, ep_id=None, aid=None):
|
||||||
sub_json = self._call_api(
|
sub_json = self._call_api(
|
||||||
'/web/v2/subtitle', ep_id or aid, note='Downloading subtitles list',
|
'/web/v2/subtitle', ep_id or aid, fatal=False,
|
||||||
errnote='Unable to download subtitles list', query=filter_dict({
|
note='Downloading subtitles list', errnote='Unable to download subtitles list',
|
||||||
|
query=filter_dict({
|
||||||
'platform': 'web',
|
'platform': 'web',
|
||||||
|
's_locale': 'en_US',
|
||||||
'episode_id': ep_id,
|
'episode_id': ep_id,
|
||||||
'aid': aid,
|
'aid': aid,
|
||||||
}))
|
})) or {}
|
||||||
subtitles = {}
|
subtitles = {}
|
||||||
for sub in sub_json.get('subtitles') or []:
|
for sub in sub_json.get('subtitles') or []:
|
||||||
sub_url = sub.get('url')
|
sub_url = sub.get('url')
|
||||||
|
Loading…
Reference in New Issue
Block a user