Mercurial > hg > index.fcgi > www > www-1
changeset 142:2ed8cf5f36bf
myrss2: fix handling of null feed title or links; miscellaneous URL updates
author | paulo |
---|---|
date | Mon, 18 Dec 2023 20:10:27 +0000 |
parents | df18c9d8857c |
children | 627316f64e79 |
files | myrss2/FEEDS myrss2/myrss_app.py |
diffstat | 2 files changed, 7 insertions(+), 2 deletions(-) [+] |
line diff
1.1 --- a/myrss2/FEEDS Sun Aug 06 17:34:26 2023 +0000 1.2 +++ b/myrss2/FEEDS Mon Dec 18 20:10:27 2023 +0000 1.3 @@ -10,7 +10,7 @@ 1.4 http://rss.slashdot.org/Slashdot/slashdot 1.5 http://www.theverge.com/rss/index.xml 1.6 https://restofworld.org/feed/latest 1.7 -http://www.reddit.com/.rss 1.8 +https://www.reddit.com/.rss 1.9 http://feeds.feedburner.com/Metafilter 1.10 http://feeds.feedburner.com/AskMetafilter 1.11 http://feeds.slate.com/slate 1.12 @@ -28,7 +28,7 @@ 1.13 http://longform.org/feed/ 1.14 http://longreads.com/rss/ 1.15 https://www.project-syndicate.org/rss 1.16 -http://lifehacker.com/rss 1.17 +https://lifehacker.com/feed/rss 1.18 http://jalopnik.com/rss 1.19 https://www.thedrive.com/feed 1.20 https://www.rideapart.com/rss/articles/all/
2.1 --- a/myrss2/myrss_app.py Sun Aug 06 17:34:26 2023 +0000 2.2 +++ b/myrss2/myrss_app.py Mon Dec 18 20:10:27 2023 +0000 2.3 @@ -138,6 +138,11 @@ 2.4 2.5 (title, link, items) = feed 2.6 2.7 + if title is None: 2.8 + title = "(No title)" 2.9 + if link is None: 2.10 + link = "" 2.11 + 2.12 logging.debug("title: %s", title) 2.13 body.h2.a(_strip_html(title), href=link, klass="z%d" % (link_z % MAX_LINK_Z)) 2.14 link_z += 1