[generic] Set rss guid as video id (#2741)

Closes #2424
Authored by: Bricio
This commit is contained in:
Bricio 2022-02-11 20:32:58 -03:00 committed by GitHub
parent 1ce9a3cb49
commit 2068a60318
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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),