Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
pass
logger.error('Cannot parse date: %s', repr(text))
return 0
# If you modify the mapping, don't forget to also update the documentation
# section "Supported XML Elements and Attributes" in doc/index.rst
MAPPING = {
'rss': RSS(),
'rss/channel': PodcastItem(),
'rss/channel/title': PodcastAttr('title', squash_whitespace),
'rss/channel/link': PodcastAttrRelativeLink('link'),
'rss/channel/description': PodcastAttr('description', squash_whitespace),
'rss/channel/image/url': PodcastAttrRelativeLink('cover_url'),
'rss/channel/itunes:image': PodcastAttrFromHref('cover_url'),
'rss/channel/atom:link': PodcastAtomLink(),
'rss/channel/item': EpisodeItem(),
'rss/channel/item/guid': EpisodeGuid('guid'),
'rss/channel/item/title': EpisodeAttr('title', squash_whitespace),
'rss/channel/item/link': EpisodeAttrRelativeLink('link'),
'rss/channel/item/description': RSSItemDescription(),
'rss/channel/item/itunes:summary': EpisodeAttr('description', squash_whitespace),
'rss/channel/item/media:description': EpisodeAttr('description', squash_whitespace),
'rss/channel/item/itunes:subtitle': EpisodeAttr('subtitle', squash_whitespace),
'rss/channel/item/content:encoded': EpisodeAttr('description_html'),
'rss/channel/item/itunes:duration': EpisodeAttr('total_time', parse_time),
'rss/channel/item/pubDate': EpisodeAttr('published', parse_pubdate),
'rss/channel/item/atom:link': AtomLink(),
'rss/channel/item/media:content': Enclosure('fileSize'),