From f5f5c17e541f2a42d38e49b80a8d17bd32808c00 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 15 Aug 2024 22:14:24 +0100 Subject: [PATCH] Extra search for youtube urls --- youtube.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/youtube.py b/youtube.py index 26649325c..7989cdfc2 100644 --- a/youtube.py +++ b/youtube.py @@ -42,6 +42,21 @@ def get_youtube(actor_json: {}) -> str: continue youtube_text = property_value[prop_value_name] return remove_html(youtube_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 + youtube_text = property_value[prop_value_name] + if 'youtube.com' not in youtube_text: + continue + return remove_html(youtube_text) + return ''