mirror of https://gitlab.com/bashrc2/epicyon
Less indentation
parent
1761c24bed
commit
0ec2c45b50
27
posts.py
27
posts.py
|
@ -862,20 +862,19 @@ def _getPostsForBlockedDomains(baseDir: str,
|
||||||
if not tagItem.get('type'):
|
if not tagItem.get('type'):
|
||||||
continue
|
continue
|
||||||
tagType = tagItem['type'].lower()
|
tagType = tagItem['type'].lower()
|
||||||
if tagType == 'mention':
|
if tagType == 'mention' and tagItem.get('href'):
|
||||||
if tagItem.get('href'):
|
postDomain, postPort = \
|
||||||
postDomain, postPort = \
|
getDomainFromActor(tagItem['href'])
|
||||||
getDomainFromActor(tagItem['href'])
|
if isBlockedDomain(baseDir, postDomain):
|
||||||
if isBlockedDomain(baseDir, postDomain):
|
if item['object'].get('url'):
|
||||||
if item['object'].get('url'):
|
url = item['object']['url']
|
||||||
url = item['object']['url']
|
else:
|
||||||
else:
|
url = item['object']['id']
|
||||||
url = item['object']['id']
|
if not blockedPosts.get(postDomain):
|
||||||
if not blockedPosts.get(postDomain):
|
blockedPosts[postDomain] = [url]
|
||||||
blockedPosts[postDomain] = [url]
|
else:
|
||||||
else:
|
if url not in blockedPosts[postDomain]:
|
||||||
if url not in blockedPosts[postDomain]:
|
blockedPosts[postDomain].append(url)
|
||||||
blockedPosts[postDomain].append(url)
|
|
||||||
return blockedPosts
|
return blockedPosts
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue