From 58cab9e5ec79e0f7ea2c24b00bc9509d6b520b3a Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 3 Oct 2020 23:20:21 +0100 Subject: [PATCH] Check that feeds look like feeds --- session.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/session.py b/session.py index b9275144..832e6c57 100644 --- a/session.py +++ b/session.py @@ -200,6 +200,11 @@ def getRSSFromSubscriptions(session, subscriptionsFilename: str) -> {}: rssFeed = fp.readlines() result = {} for url in rssFeed: + url = url.strip() + if '://' not in url: + continue + if url.startswith('#'): + continue result = dict(result.items() + getRSS(session, url).items()) sortedResult = OrderedDict(sorted(result.items(), reverse=False)) return sortedResult