From 774a46c53dc75eae68d11abdc40b7fe7e1e828ca Mon Sep 17 00:00:00 2001 From: siddharth Date: Thu, 23 Dec 2021 21:15:48 -0500 Subject: [PATCH] [npr] Make SMIL extraction non-fatal (#2099) Closes #1934 Authored by: r5d --- yt_dlp/extractor/common.py | 2 +- yt_dlp/extractor/npr.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py index e15763953..6cd2551bf 100644 --- a/yt_dlp/extractor/common.py +++ b/yt_dlp/extractor/common.py @@ -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) diff --git a/yt_dlp/extractor/npr.py b/yt_dlp/extractor/npr.py index 9d1122f0c..49f062d7a 100644 --- a/yt_dlp/extractor/npr.py +++ b/yt_dlp/extractor/npr.py @@ -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: