Use published rather than updated for youtube feeds

main
Bob Mottram 2020-11-28 20:46:52 +00:00
parent c05cb812e1
commit 5a449ab4e9
1 changed files with 4 additions and 4 deletions

View File

@ -370,9 +370,9 @@ def atomFeedYTToDict(baseDir: str, domain: str, xmlStr: str,
continue continue
if '</title>' not in atomItem: if '</title>' not in atomItem:
continue continue
if '<updated>' not in atomItem: if '<published>' not in atomItem:
continue continue
if '</updated>' not in atomItem: if '</published>' not in atomItem:
continue continue
if '<yt:videoId>' not in atomItem: if '<yt:videoId>' not in atomItem:
continue continue
@ -393,8 +393,8 @@ def atomFeedYTToDict(baseDir: str, domain: str, xmlStr: str,
link = atomItem.split('<yt:videoId>')[1] link = atomItem.split('<yt:videoId>')[1]
link = link.split('</yt:videoId>')[0] link = link.split('</yt:videoId>')[0]
link = 'https://www.youtube.com/watch?v=' + link.strip() link = 'https://www.youtube.com/watch?v=' + link.strip()
pubDate = atomItem.split('<updated>')[1] pubDate = atomItem.split('<published>')[1]
pubDate = pubDate.split('</updated>')[0] pubDate = pubDate.split('</published>')[0]
pubDateStr = parseFeedDate(pubDate) pubDateStr = parseFeedDate(pubDate)
if pubDateStr: if pubDateStr: