Try media description if description doesn't exist

main
Bob Mottram 2020-11-21 23:29:46 +00:00
parent a557c4a060
commit fad926c7ec
1 changed files with 5 additions and 0 deletions

View File

@ -248,6 +248,11 @@ def atomFeedToDict(baseDir: str, domain: str, xmlStr: str,
if '<summary>' in rssItem and '</summary>' in rssItem: if '<summary>' in rssItem and '</summary>' in rssItem:
description = rssItem.split('<summary>')[1] description = rssItem.split('<summary>')[1]
description = description.split('</summary>')[0] description = description.split('</summary>')[0]
else:
if '<media:description>' in rssItem and \
'</media:description>' in rssItem:
description = rssItem.split('<media:description>')[1]
description = description.split('</media:description>')[0]
link = rssItem.split('<link>')[1] link = rssItem.split('<link>')[1]
link = link.split('</link>')[0] link = link.split('</link>')[0]
if '://' not in link: if '://' not in link: