From b0a80dbb612953bff05a6a9004bb77756e77d6ce Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 17 Oct 2020 21:53:36 +0100 Subject: [PATCH] Conflicting domains --- newswire.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/newswire.py b/newswire.py index 089391be5..a6773f3f2 100644 --- a/newswire.py +++ b/newswire.py @@ -140,10 +140,10 @@ def xml2StrToDict(baseDir: str, domain: str, link = link.split('')[0] if '://' not in link: continue - domain = link.split('://')[1] - if '/' in domain: - domain = domain.split('/')[0] - if isBlockedDomain(baseDir, domain): + itemDomain = link.split('://')[1] + if '/' in itemDomain: + itemDomain = itemDomain.split('/')[0] + if isBlockedDomain(baseDir, itemDomain): continue pubDate = rssItem.split('')[1] pubDate = pubDate.split('')[0] @@ -219,10 +219,10 @@ def atomFeedToDict(baseDir: str, domain: str, link = link.split('')[0] if '://' not in link: continue - domain = link.split('://')[1] - if '/' in domain: - domain = domain.split('/')[0] - if isBlockedDomain(baseDir, domain): + itemDomain = link.split('://')[1] + if '/' in itemDomain: + itemDomain = itemDomain.split('/')[0] + if isBlockedDomain(baseDir, itemDomain): continue pubDate = rssItem.split('')[1] pubDate = pubDate.split('')[0]