aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrenalid <renalid@gmail.com>2020-12-19 17:18:51 +0100
committerGitHub <noreply@github.com>2020-12-19 23:18:51 +0700
commit71679eaee857d9dfcf1fdc4b5016abfc1fe8bc45 (patch)
tree6805e4ad28d80edf6a4c16b5195951c9d01890e2
parent76fe4ba3b22a689ba7b5c6ea9064796ce1f4af55 (diff)
downloadyoutube-dl-71679eaee857d9dfcf1fdc4b5016abfc1fe8bc45.tar.xz
[generic] Fix RSS itunes thumbnail extraction (#27405)
-rw-r--r--youtube_dl/extractor/generic.py27
1 files changed, 26 insertions, 1 deletions
diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py
index 80ecaf795..ab24572e4 100644
--- a/youtube_dl/extractor/generic.py
+++ b/youtube_dl/extractor/generic.py
@@ -35,6 +35,7 @@ from ..utils import (
unsmuggle_url,
UnsupportedError,
url_or_none,
+ xpath_attr,
xpath_text,
xpath_with_ns,
)
@@ -217,6 +218,30 @@ class GenericIE(InfoExtractor):
},
}],
},
+ # RSS feed with item with description and thumbnails
+ {
+ 'url': 'https://anchor.fm/s/dd00e14/podcast/rss',
+ 'info_dict': {
+ 'id': 'https://anchor.fm/s/dd00e14/podcast/rss',
+ 'title': 're:.*100% Hydrogen.*',
+ 'description': 're:.*In this episode.*',
+ },
+ 'playlist': [{
+ 'info_dict': {
+ 'ext': 'm4a',
+ 'id': 'c1c879525ce2cb640b344507e682c36d',
+ 'title': 're:Hydrogen!',
+ 'description': 're:.*In this episode we are going.*',
+ 'timestamp': int,
+ 'upload_date': '20190908',
+ 'duration': int,
+ 'thumbnail': r're:^https?://.*\.jpg$',
+ },
+ }],
+ 'params': {
+ 'skip_download': True,
+ },
+ },
# RSS feed with enclosures and unsupported link URLs
{
'url': 'http://www.hellointernet.fm/podcast?format=rss',
@@ -2234,7 +2259,7 @@ class GenericIE(InfoExtractor):
'timestamp': unified_timestamp(
xpath_text(it, 'pubDate', default=None)),
'duration': int_or_none(duration) or parse_duration(duration),
- 'thumbnail': url_or_none(itunes('image')),
+ 'thumbnail': url_or_none(xpath_attr(it, xpath_with_ns('./itunes:image', NS_MAP), 'href')),
'episode': itunes('title'),
'episode_number': int_or_none(itunes('episode')),
'season_number': int_or_none(itunes('season')),