]> jfr.im git - yt-dlp.git/commitdiff
[extractor/drtv] Fix bug in ab4cbef (#6034)
authorbashonly <redacted>
Sat, 14 Jan 2023 16:35:47 +0000 (10:35 -0600)
committerGitHub <redacted>
Sat, 14 Jan 2023 16:35:47 +0000 (16:35 +0000)
Fixes bug in ab4cbef ab4cbeff00ac08f142f78a6281aa0c1124a59daa
Closes #5993
Authored by: bashonly

yt_dlp/extractor/drtv.py

index d3e197551d93aaa75aadb068b92f1df68e5b543f..470546bbcda4f05a0d5de698894ee23f8cf925aa 100644 (file)
@@ -184,9 +184,10 @@ def _real_extract(self, url):
         data = self._download_json(
             programcard_url, video_id, 'Downloading video JSON', query=query)
 
-        supplementary_data = self._download_json(
-            SERIES_API % f'/episode/{raw_video_id}', raw_video_id,
-            default={}) if re.search(r'_\d+$', raw_video_id) else {}
+        supplementary_data = {}
+        if re.search(r'_\d+$', raw_video_id):
+            supplementary_data = self._download_json(
+                SERIES_API % f'/episode/{raw_video_id}', raw_video_id, fatal=False) or {}
 
         title = str_or_none(data.get('Title')) or re.sub(
             r'\s*\|\s*(?:TV\s*\|\s*DR|DRTV)$', '',