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