|
|
@ -789,7 +789,8 @@ class BiliIntlBaseIE(InfoExtractor):
|
|
|
|
def json2srt(self, json):
|
|
|
|
def json2srt(self, json):
|
|
|
|
data = '\n\n'.join(
|
|
|
|
data = '\n\n'.join(
|
|
|
|
f'{i + 1}\n{srt_subtitles_timecode(line["from"])} --> {srt_subtitles_timecode(line["to"])}\n{line["content"]}'
|
|
|
|
f'{i + 1}\n{srt_subtitles_timecode(line["from"])} --> {srt_subtitles_timecode(line["to"])}\n{line["content"]}'
|
|
|
|
for i, line in enumerate(json['body']) if line.get('content'))
|
|
|
|
for i, line in enumerate(traverse_obj(json, (
|
|
|
|
|
|
|
|
'body', lambda _, l: l['content'] and l['from'] and l['to']))))
|
|
|
|
return data
|
|
|
|
return data
|
|
|
|
|
|
|
|
|
|
|
|
def _get_subtitles(self, *, ep_id=None, aid=None):
|
|
|
|
def _get_subtitles(self, *, ep_id=None, aid=None):
|
|
|
|