Improve website attachment validation

merge-requests/30/head
Bob Mottram 2023-09-08 11:35:44 +01:00
parent 58761260eb
commit 9d3ffb24e0
1 changed files with 6 additions and 2 deletions

View File

@ -19,7 +19,7 @@ def _get_donation_types() -> []:
def _get_website_strings() -> []:
return ['www', 'website', 'web', 'homepage']
return ['www', 'website', 'web', 'homepage', 'contact']
def _get_gemini_strings() -> []:
@ -84,7 +84,11 @@ def get_website(actor_json: {}, translate: {}) -> str:
continue
if not property_value['type'].endswith('PropertyValue'):
continue
return remove_html(property_value[prop_value_name])
value_str = remove_html(property_value[prop_value_name])
if 'https://' not in value_str and \
'http://' not in value_str:
continue
return value_str
return ''