]> jfr.im git - yt-dlp.git/commitdiff
[generic] Set rss `guid` as video id (#2741)
authorBricio <redacted>
Fri, 11 Feb 2022 23:32:58 +0000 (20:32 -0300)
committerGitHub <redacted>
Fri, 11 Feb 2022 23:32:58 +0000 (15:32 -0800)
Closes #2424
Authored by: Bricio

yt_dlp/extractor/generic.py

index f723d1e8c33e736ea89712d9061f40fa08c41e85..baedd7948b29e6b96d466394774c6856af164f7a 100644 (file)
@@ -213,7 +213,7 @@ class GenericIE(InfoExtractor):
         {
             'url': 'http://phihag.de/2014/youtube-dl/rss2.xml',
             'info_dict': {
-                'id': 'http://phihag.de/2014/youtube-dl/rss2.xml',
+                'id': 'https://phihag.de/2014/youtube-dl/rss2.xml',
                 'title': 'Zero Punctuation',
                 'description': 're:.*groundbreaking video review series.*'
             },
@@ -258,6 +258,9 @@ class GenericIE(InfoExtractor):
                     'episode_number': 1,
                     'season_number': 1,
                     'age_limit': 0,
+                    'season': 'Season 1',
+                    'direct': True,
+                    'episode': 'Episode 1',
                 },
             }],
             'params': {
@@ -274,6 +277,16 @@ class GenericIE(InfoExtractor):
             },
             'playlist_mincount': 100,
         },
+        # RSS feed with guid
+        {
+            'url': 'https://www.omnycontent.com/d/playlist/a7b4f8fe-59d9-4afc-a79a-a90101378abf/bf2c1d80-3656-4449-9d00-a903004e8f84/efbff746-e7c1-463a-9d80-a903004e8f8f/podcast.rss',
+            'info_dict': {
+                'id': 'https://www.omnycontent.com/d/playlist/a7b4f8fe-59d9-4afc-a79a-a90101378abf/bf2c1d80-3656-4449-9d00-a903004e8f84/efbff746-e7c1-463a-9d80-a903004e8f8f/podcast.rss',
+                'description': 'md5:be809a44b63b0c56fb485caf68685520',
+                'title': 'The Little Red Podcast',
+            },
+            'playlist_mincount': 76,
+        },
         # SMIL from http://videolectures.net/promogram_igor_mekjavic_eng
         {
             'url': 'http://videolectures.net/promogram_igor_mekjavic_eng/video/1/smil.xml',
@@ -2518,6 +2531,9 @@ def _extract_rss(self, url, video_id, doc):
             if not next_url:
                 continue
 
+            if it.find('guid').text is not None:
+                next_url = smuggle_url(next_url, {'force_videoid': it.find('guid').text})
+
             def itunes(key):
                 return xpath_text(
                     it, xpath_with_ns('./itunes:%s' % key, NS_MAP),