]> jfr.im git - yt-dlp.git/commitdiff
[npr] Make SMIL extraction non-fatal (#2099)
authorsiddharth <redacted>
Fri, 24 Dec 2021 02:15:48 +0000 (21:15 -0500)
committerGitHub <redacted>
Fri, 24 Dec 2021 02:15:48 +0000 (07:45 +0530)
Closes #1934
Authored by: r5d

yt_dlp/extractor/common.py
yt_dlp/extractor/npr.py

index e157639531b22e9c6724452586a41d13f8dd4b37..6cd2551bfa19b8fcc7b01a78497bbfcf6a5dfc90 100644 (file)
@@ -2332,7 +2332,7 @@ def _extract_smil_formats_and_subtitles(self, smil_url, video_id, fatal=True, f4
 
         if smil is False:
             assert not fatal
-            return []
+            return [], {}
 
         namespace = self._parse_smil_namespace(smil)
 
index 9d1122f0c723524e250201643257085520a05743..49f062d7ab1394c63d8d40686ce692819694f3e0 100644 (file)
@@ -91,7 +91,8 @@ def _real_extract(self, url):
                     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: