mirror of https://gitlab.com/bashrc2/epicyon
Tidying
parent
df573d1c93
commit
a940719a34
|
@ -123,6 +123,10 @@ def _htmlPostMetadataOpenGraph(domain: str, postJsonObject: {}) -> str:
|
||||||
continue
|
continue
|
||||||
if not attachJson.get('mediaType'):
|
if not attachJson.get('mediaType'):
|
||||||
continue
|
continue
|
||||||
|
if not attachJson.get('url'):
|
||||||
|
continue
|
||||||
|
if not attachJson.get('name'):
|
||||||
|
continue
|
||||||
description = None
|
description = None
|
||||||
if attachJson['mediaType'].startswith('image/'):
|
if attachJson['mediaType'].startswith('image/'):
|
||||||
description = 'Attached: 1 image'
|
description = 'Attached: 1 image'
|
||||||
|
@ -130,9 +134,7 @@ def _htmlPostMetadataOpenGraph(domain: str, postJsonObject: {}) -> str:
|
||||||
description = 'Attached: 1 video'
|
description = 'Attached: 1 video'
|
||||||
elif attachJson['mediaType'].startswith('audio/'):
|
elif attachJson['mediaType'].startswith('audio/'):
|
||||||
description = 'Attached: 1 audio'
|
description = 'Attached: 1 audio'
|
||||||
if description and \
|
if description:
|
||||||
attachJson.get('name') and \
|
|
||||||
attachJson.get('url'):
|
|
||||||
if objJson.get('content'):
|
if objJson.get('content'):
|
||||||
description += '\n\n' + removeHtml(objJson['content'])
|
description += '\n\n' + removeHtml(objJson['content'])
|
||||||
metadata += \
|
metadata += \
|
||||||
|
|
Loading…
Reference in New Issue