1
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-03-09 12:50:23 -05:00

Apply review suggestions

Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
This commit is contained in:
sepro 2025-03-03 22:50:37 +01:00 committed by GitHub
parent 2c4b308cc0
commit 3fa611f3ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -48,9 +48,9 @@ def _real_extract(self, url):
data = traverse_obj(context, ((('video', 'detail'), ('series', 'currentEpisode')), {dict}, any)) data = traverse_obj(context, ((('video', 'detail'), ('series', 'currentEpisode')), {dict}, any))
formats, subtitles = [], {} formats, subtitles = [], {}
for url in set(traverse_obj(data, ((('manifests', ..., 'hls'), 'jwp_video_url'), {url_or_none}))): for m3u8_url in set(traverse_obj(data, ((('manifests', ..., 'hls'), 'jwp_video_url'), {url_or_none}))):
fmts, subs = self._extract_m3u8_formats_and_subtitles( fmts, subs = self._extract_m3u8_formats_and_subtitles(
url, video_id, 'mp4', m3u8_id='hls', fatal=False) m3u8_url, video_id, 'mp4', m3u8_id='hls', fatal=False)
formats.extend(fmts) formats.extend(fmts)
self._merge_subtitles(subs, target=subtitles) self._merge_subtitles(subs, target=subtitles)
if not formats and (error := traverse_obj(context, ('errorDetailPage', 'errorMessage', {str}))): if not formats and (error := traverse_obj(context, ('errorDetailPage', 'errorMessage', {str}))):