mirror of https://gitlab.com/bashrc2/epicyon
Use id uf url is unavailable
parent
93e4ab9337
commit
3122b8b3a6
16
posts.py
16
posts.py
|
@ -547,9 +547,11 @@ def getPostsForBlockedDomains(baseDir: str,
|
||||||
if isinstance(item['object']['inReplyTo'], str):
|
if isinstance(item['object']['inReplyTo'], str):
|
||||||
postDomain, postPort = \
|
postDomain, postPort = \
|
||||||
getDomainFromActor(item['object']['inReplyTo'])
|
getDomainFromActor(item['object']['inReplyTo'])
|
||||||
if isBlockedDomain(baseDir, postDomain) and \
|
if isBlockedDomain(baseDir, postDomain):
|
||||||
item['object'].get('url'):
|
if item['object'].get('url'):
|
||||||
url = item['object']['url']
|
url = item['object']['url']
|
||||||
|
else:
|
||||||
|
url = item['object']['id']
|
||||||
if not blockedPosts.get(postDomain):
|
if not blockedPosts.get(postDomain):
|
||||||
blockedPosts[postDomain] = [url]
|
blockedPosts[postDomain] = [url]
|
||||||
else:
|
else:
|
||||||
|
@ -563,9 +565,11 @@ def getPostsForBlockedDomains(baseDir: str,
|
||||||
if tagItem.get('href'):
|
if tagItem.get('href'):
|
||||||
postDomain, postPort = \
|
postDomain, postPort = \
|
||||||
getDomainFromActor(tagItem['href'])
|
getDomainFromActor(tagItem['href'])
|
||||||
if isBlockedDomain(baseDir, postDomain) and \
|
if isBlockedDomain(baseDir, postDomain):
|
||||||
item['object'].get('url'):
|
if item['object'].get('url'):
|
||||||
url = item['object']['url']
|
url = item['object']['url']
|
||||||
|
else:
|
||||||
|
url = item['object']['id']
|
||||||
if not blockedPosts.get(postDomain):
|
if not blockedPosts.get(postDomain):
|
||||||
blockedPosts[postDomain] = [url]
|
blockedPosts[postDomain] = [url]
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue