Extra search for peertube urls

main
Bob Mottram 2024-08-15 22:16:40 +01:00
parent f5f5c17e54
commit ce80fccd93
1 changed files with 14 additions and 0 deletions

View File

@ -42,6 +42,20 @@ def get_peertube(actor_json: {}) -> str:
continue
peertube_text = property_value[prop_value_name]
return remove_html(peertube_text)
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
peertube_text = property_value[prop_value_name]
if '//peertube.' not in peertube_text:
continue
return remove_html(peertube_text)
return ''