Skip to content

A feature-rich command-line audio/video downloader

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

siddharth774a46c53dc7
diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py
index e157639531..6cd2551bfa 100644
--- a/yt_dlp/extractor/common.py
+++ b/yt_dlp/extractor/common.py
@@ -2332,7 +2332,7 @@ class InfoExtractor(object):
if smil is False:
assert not fatal
- return []
+ return [], {}
namespace = self._parse_smil_namespace(smil)
diff --git a/yt_dlp/extractor/npr.py b/yt_dlp/extractor/npr.py
index 9d1122f0c7..49f062d7ab 100644
--- a/yt_dlp/extractor/npr.py
+++ b/yt_dlp/extractor/npr.py
@@ -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: