Skip to content

Commit 5817daf

Browse files
committed
Add rss/channel/itunes:summary handling
1 parent 68d40fa commit 5817daf

8 files changed

Lines changed: 38 additions & 0 deletions

doc/index.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ RSS
105105
**rss/channel/description**
106106
Podcast description (whitespace is squashed).
107107

108+
**rss/channel/itunes:summary**
109+
Podcast description (whitespace is squashed).
110+
108111
**rss/channel/image/url**
109112
Podcast cover art.
110113

podcastparser.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -740,6 +740,7 @@ def parse_pubdate(text):
740740
'rss/channel/title': PodcastAttr('title', squash_whitespace),
741741
'rss/channel/link': PodcastAttrRelativeLink('link'),
742742
'rss/channel/description': PodcastAttr('description', squash_whitespace_not_nl),
743+
'rss/channel/itunes:summary': PodcastAttr('description', squash_whitespace_not_nl, overwrite=False),
743744
'rss/channel/podcast:funding': PodcastAttrFromUrl('funding_url'),
744745
'rss/channel/podcast:locked': PodcastAttrExplicit('import_prohibited'),
745746
'rss/channel/image/url': PodcastAttrRelativeLink('cover_url'),
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"title": "Example Feed",
3+
"description": "A podcast with a description field",
4+
"episodes": []
5+
}

tests/data/channel_description.rss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<rss>
2+
<channel>
3+
<title>Example Feed</title>
4+
<description>A podcast with a description field</description>
5+
</channel>
6+
</rss>

tests/data/channel_summary.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"title": "Example Feed",
3+
"description": "A podcast with a summary field",
4+
"episodes": []
5+
}

tests/data/channel_summary.rss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
2+
<channel>
3+
<title>Example Feed</title>
4+
<itunes:summary>A podcast with a summary field</itunes:summary>
5+
</channel>
6+
</rss>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"title": "Example Feed",
3+
"description": "A podcast with a description field",
4+
"episodes": []
5+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
2+
<channel>
3+
<title>Example Feed</title>
4+
<description>A podcast with a description field</description>
5+
<itunes:summary>A podcast with a summary field</itunes:summary>
6+
</channel>
7+
</rss>

0 commit comments

Comments
 (0)