diff --git a/yt_dlp/extractor/abc.py b/yt_dlp/extractor/abc.py index 4b574d7320..65b7d60106 100644 --- a/yt_dlp/extractor/abc.py +++ b/yt_dlp/extractor/abc.py @@ -334,10 +334,9 @@ def tokenize_url(url, token): # Note: pre-merged formats in hls-latest are treated as video-only if audio-only tracks # are present, so we extract both types for label in ('hls', 'hls-latest'): - for sd_url in traverse_obj(stream, ('streams', label, ('1080', '720', 'sd', 'sd-low'), {str})): + for sd_url in traverse_obj(stream, ('streams', label, ('1080', '720', 'sd', 'sd-low'), {url_or_none})): fmts = self._extract_m3u8_formats( - tokenize_url(sd_url, token), video_id, 'mp4', - entry_protocol='m3u8_native', m3u8_id=label, fatal=False) + tokenize_url(sd_url, token), video_id, 'mp4', m3u8_id=label, fatal=False) if fmts: formats.extend(fmts) break @@ -349,7 +348,7 @@ def tokenize_url(url, token): 'ext': 'vtt', }] - title = unescapeHTML(traverse_obj(video_params, 'title', 'seriesTitle', 'showTitle')) + title = traverse_obj(video_params, 'title', 'seriesTitle', 'showTitle', expected_type=unescapeHTML) return { 'id': video_id,