[npr] Make SMIL extraction non-fatal (#2099)

Closes #1934
Authored by: r5d
This commit is contained in:
siddharth 2021-12-23 21:15:48 -05:00 committed by GitHub
parent c8b80b9643
commit 774a46c53d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -2332,7 +2332,7 @@ class InfoExtractor(object):
if smil is False:
assert not fatal
return []
return [], {}
namespace = self._parse_smil_namespace(smil)

View file

@ -91,7 +91,8 @@ class NprIE(InfoExtractor):
elif format_id == 'smil':
smil_formats = self._extract_smil_formats(
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)
formats.extend(smil_formats)
else: