From efa82d4c328480396e253eadfa7df10aee25a8ef Mon Sep 17 00:00:00 2001 From: Aevann Date: Fri, 15 Sep 2023 04:19:09 +0300 Subject: [PATCH] remove unnecessary youtube archival that doesnt even work --- files/helpers/actions.py | 5 ----- files/helpers/regex.py | 1 - 2 files changed, 6 deletions(-) diff --git a/files/helpers/actions.py b/files/helpers/actions.py index e181020ae..9be0fbeae 100644 --- a/files/helpers/actions.py +++ b/files/helpers/actions.py @@ -173,11 +173,6 @@ def execute_snappy(post, v): title = i.group(2) captured.append((href, title)) - for i in list(snappy_youtube_regex.finditer(body_for_snappy)): - href = f'https://youtube.com/watch?v={i.group(1)}' - if href in [x[0] for x in captured]: continue - captured.append((href, href)) - for href, title in captured: if href.startswith(f'{SITE_FULL}/') or href.startswith(SITE_FULL_IMAGES): continue diff --git a/files/helpers/regex.py b/files/helpers/regex.py index fec1186ba..a7285b955 100644 --- a/files/helpers/regex.py +++ b/files/helpers/regex.py @@ -53,7 +53,6 @@ emoji_regex = re.compile(f"

\s*(:[!#@\w\-]{{1,72}}:\s*)+<\/p>", flags=re.A) emoji_regex2 = re.compile(f'(?|[^`]*`))', flags=re.A) snappy_url_regex = re.compile('(.+?)<\/a>', flags=re.A) -snappy_youtube_regex = re.compile('