mirror of https://gitlab.com/bashrc2/epicyon
Deduplicate blocked posts list
parent
db98be75dd
commit
18e572e21f
6
posts.py
6
posts.py
|
@ -553,7 +553,8 @@ def getPostsForBlockedDomains(baseDir: str,
|
||||||
if not blockedPosts.get(postDomain):
|
if not blockedPosts.get(postDomain):
|
||||||
blockedPosts[postDomain] = [url]
|
blockedPosts[postDomain] = [url]
|
||||||
else:
|
else:
|
||||||
blockedPosts[postDomain].append(url)
|
if url not in blockedPosts[postDomain]:
|
||||||
|
blockedPosts[postDomain].append(url)
|
||||||
|
|
||||||
if item['object'].get('tag'):
|
if item['object'].get('tag'):
|
||||||
for tagItem in item['object']['tag']:
|
for tagItem in item['object']['tag']:
|
||||||
|
@ -568,7 +569,8 @@ def getPostsForBlockedDomains(baseDir: str,
|
||||||
if not blockedPosts.get(postDomain):
|
if not blockedPosts.get(postDomain):
|
||||||
blockedPosts[postDomain] = [url]
|
blockedPosts[postDomain] = [url]
|
||||||
else:
|
else:
|
||||||
blockedPosts[postDomain].append(url)
|
if url not in blockedPosts[postDomain]:
|
||||||
|
blockedPosts[postDomain].append(url)
|
||||||
return blockedPosts
|
return blockedPosts
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue