mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-18 01:07:50 +01:00
[npr] Make SMIL extraction non-fatal (#2099)
Closes #1934 Authored by: r5d
This commit is contained in:
parent
c8b80b9643
commit
774a46c53d
@ -2332,7 +2332,7 @@ def _extract_smil_formats_and_subtitles(self, smil_url, video_id, fatal=True, f4
|
|||||||
|
|
||||||
if smil is False:
|
if smil is False:
|
||||||
assert not fatal
|
assert not fatal
|
||||||
return []
|
return [], {}
|
||||||
|
|
||||||
namespace = self._parse_smil_namespace(smil)
|
namespace = self._parse_smil_namespace(smil)
|
||||||
|
|
||||||
|
@ -91,7 +91,8 @@ def _real_extract(self, url):
|
|||||||
elif format_id == 'smil':
|
elif format_id == 'smil':
|
||||||
smil_formats = self._extract_smil_formats(
|
smil_formats = self._extract_smil_formats(
|
||||||
format_url, media_id, transform_source=lambda s: s.replace(
|
format_url, media_id, transform_source=lambda s: s.replace(
|
||||||
'rtmp://flash.npr.org/ondemand/', 'https://ondemand.npr.org/'))
|
'rtmp://flash.npr.org/ondemand/', 'https://ondemand.npr.org/'),
|
||||||
|
fatal=False)
|
||||||
self._check_formats(smil_formats, media_id)
|
self._check_formats(smil_formats, media_id)
|
||||||
formats.extend(smil_formats)
|
formats.extend(smil_formats)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user