mirror of https://gitlab.com/bashrc2/epicyon
Conflicting domains
parent
996499a223
commit
b0a80dbb61
16
newswire.py
16
newswire.py
|
@ -140,10 +140,10 @@ def xml2StrToDict(baseDir: str, domain: str,
|
||||||
link = link.split('</link>')[0]
|
link = link.split('</link>')[0]
|
||||||
if '://' not in link:
|
if '://' not in link:
|
||||||
continue
|
continue
|
||||||
domain = link.split('://')[1]
|
itemDomain = link.split('://')[1]
|
||||||
if '/' in domain:
|
if '/' in itemDomain:
|
||||||
domain = domain.split('/')[0]
|
itemDomain = itemDomain.split('/')[0]
|
||||||
if isBlockedDomain(baseDir, domain):
|
if isBlockedDomain(baseDir, itemDomain):
|
||||||
continue
|
continue
|
||||||
pubDate = rssItem.split('<pubDate>')[1]
|
pubDate = rssItem.split('<pubDate>')[1]
|
||||||
pubDate = pubDate.split('</pubDate>')[0]
|
pubDate = pubDate.split('</pubDate>')[0]
|
||||||
|
@ -219,10 +219,10 @@ def atomFeedToDict(baseDir: str, domain: str,
|
||||||
link = link.split('</link>')[0]
|
link = link.split('</link>')[0]
|
||||||
if '://' not in link:
|
if '://' not in link:
|
||||||
continue
|
continue
|
||||||
domain = link.split('://')[1]
|
itemDomain = link.split('://')[1]
|
||||||
if '/' in domain:
|
if '/' in itemDomain:
|
||||||
domain = domain.split('/')[0]
|
itemDomain = itemDomain.split('/')[0]
|
||||||
if isBlockedDomain(baseDir, domain):
|
if isBlockedDomain(baseDir, itemDomain):
|
||||||
continue
|
continue
|
||||||
pubDate = rssItem.split('<updated>')[1]
|
pubDate = rssItem.split('<updated>')[1]
|
||||||
pubDate = pubDate.split('</updated>')[0]
|
pubDate = pubDate.split('</updated>')[0]
|
||||||
|
|
Loading…
Reference in New Issue