Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Generic] RSS adding item description #27177

Merged
merged 6 commits into from
Dec 6, 2020
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion youtube_dl/extractor/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,24 @@ class GenericIE(InfoExtractor):
},
'playlist_mincount': 100,
},
# RSS feed with items description
{
'url': 'http://radiofrance-podcast.net/podcast09/rss_14631.xml',
'info_dict': {
'id': 'http://radiofrance-podcast.net/podcast09/rss_14631.xml',
'title': 'Certains l\'aiment Fip',
'description': 're:.*FIP met le cinéma.*'
},
'playlist': [{
'info_dict': {
'id': '14631-22.11.2020-ITEMA_22491517-2020Y24252S0327',
'ext': 'mp3',
'title': 'Les musiques de Valérie Lemercier',
'description': 're:.*occasion de la sortie.*',
'upload_date': '20201122',
},
}],
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# SMIL from http://videolectures.net/promogram_igor_mekjavic_eng
{
'url': 'http://videolectures.net/promogram_igor_mekjavic_eng/video/1/smil.xml',
Expand Down Expand Up @@ -2194,11 +2212,15 @@ def _extract_rss(self, url, video_id, doc):

if not next_url:
continue


item_desc_el = it.find('description')
item_desc = None if item_desc_el is None else item_desc_el.text
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use xpath_text instead.


entries.append({
'_type': 'url_transparent',
'url': next_url,
'title': it.find('title').text,
'description': item_desc
})

return {
Expand Down