mirror of https://github.com/yt-dlp/yt-dlp.git
no non-fatal m3u8 download; code line splitting
This commit is contained in:
parent
80f4885fb0
commit
0d26f152b0
|
@ -49,8 +49,8 @@ class UnderlinePosterIE(InfoExtractor):
|
||||||
data = self._search_nextjs_data(webpage, video_id)['props']['pageProps']['fallback']
|
data = self._search_nextjs_data(webpage, video_id)['props']['pageProps']['fallback']
|
||||||
|
|
||||||
m3u8_url = traverse_obj(data, (..., 'data', 'attributes', 'playlist', {url_or_none}), get_all=False)
|
m3u8_url = traverse_obj(data, (..., 'data', 'attributes', 'playlist', {url_or_none}), get_all=False)
|
||||||
subtitle_urls = filter_dict(dict(traverse_obj(data, (..., 'data', lambda _, v: v['type'] == 'transcripts', {
|
subtitle_urls = filter_dict(dict(traverse_obj(data, (
|
||||||
lambda x: (
|
..., 'data', lambda _, v: v['type'] == 'transcripts', {lambda x: (
|
||||||
x['relationships']['language']['data']['id'],
|
x['relationships']['language']['data']['id'],
|
||||||
url_or_none(x['attributes']['subtitleUrl']),
|
url_or_none(x['attributes']['subtitleUrl']),
|
||||||
)}))))
|
)}))))
|
||||||
|
@ -58,9 +58,9 @@ class UnderlinePosterIE(InfoExtractor):
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'title': traverse_obj(data, (..., 'data', 'attributes', 'title', {str}), get_all=False),
|
'title': traverse_obj(data, (..., 'data', 'attributes', 'title', {str}), get_all=False),
|
||||||
'thumbnail': traverse_obj(
|
'thumbnail': traverse_obj(data, (
|
||||||
data, (..., 'data', 'attributes', 'originalPosterDocumentThumbnailExtractUrl', {url_or_none}), get_all=False),
|
..., 'data', 'attributes', 'originalPosterDocumentThumbnailExtractUrl', {url_or_none}), get_all=False),
|
||||||
'formats': self._extract_m3u8_formats(m3u8_url, video_id, fatal=False) if m3u8_url else [],
|
'formats': self._extract_m3u8_formats(m3u8_url, video_id) if m3u8_url else [],
|
||||||
'subtitles': filter_dict(dict(traverse_obj(data, (
|
'subtitles': filter_dict(dict(traverse_obj(data, (
|
||||||
..., 'included', lambda _, v: v['type'] == 'transcript_languages', {lambda x: (
|
..., 'included', lambda _, v: v['type'] == 'transcript_languages', {lambda x: (
|
||||||
x['attributes']['locale'],
|
x['attributes']['locale'],
|
||||||
|
|
Loading…
Reference in New Issue