Extra check for gemini sites

main
Bob Mottram 2024-08-15 23:27:20 +01:00
parent 252b27c553
commit 2fcef654a6
1 changed files with 14 additions and 0 deletions

View File

@ -141,6 +141,20 @@ def get_gemini_link(actor_json: {}) -> str:
continue
url = remove_html(property_value[prop_value_name])
return remove_link_tracking(url)
for property_value in actor_json['attachment']:
if not property_value.get('type'):
continue
prop_value_name, _ = \
get_attachment_property_value(property_value)
if not prop_value_name:
continue
if not property_value['type'].endswith('PropertyValue'):
continue
url = remove_html(property_value[prop_value_name])
if 'gemini://' not in url:
continue
return remove_link_tracking(url)
return ''