mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-26 10:24:33 +01:00
[dramafever] Improve subtitles extraction (Closes #8136)
This commit is contained in:
parent
fff79f1867
commit
1dcc38b233
@ -105,13 +105,16 @@ class DramaFeverIE(DramaFeverBaseIE):
|
|||||||
video_id, 'Downloading episode info JSON', fatal=False)
|
video_id, 'Downloading episode info JSON', fatal=False)
|
||||||
if episode_info:
|
if episode_info:
|
||||||
value = episode_info.get('value')
|
value = episode_info.get('value')
|
||||||
if value:
|
if isinstance(value, list):
|
||||||
subfile = value[0].get('subfile') or value[0].get('new_subfile')
|
for v in value:
|
||||||
|
if v.get('type') == 'Episode':
|
||||||
|
subfile = v.get('subfile') or v.get('new_subfile')
|
||||||
if subfile and subfile != 'http://www.dramafever.com/st/':
|
if subfile and subfile != 'http://www.dramafever.com/st/':
|
||||||
info.setdefault('subtitles', {}).setdefault('English', []).append({
|
info.setdefault('subtitles', {}).setdefault('English', []).append({
|
||||||
'ext': 'srt',
|
'ext': 'srt',
|
||||||
'url': subfile,
|
'url': subfile,
|
||||||
})
|
})
|
||||||
|
break
|
||||||
|
|
||||||
return info
|
return info
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user