remove unnecessary youtube archival that doesnt even work

pull/199/head
Aevann 2023-09-15 04:19:09 +03:00
parent 1aa00c3a30
commit efa82d4c32
2 changed files with 0 additions and 6 deletions

View File

@ -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

View File

@ -53,7 +53,6 @@ emoji_regex = re.compile(f"<p>\s*(:[!#@\w\-]{{1,72}}:\s*)+<\/p>", flags=re.A)
emoji_regex2 = re.compile(f'(?<!"):([!#@\w\-]{{1,72}}?):(?!([^<]*<\/(code|pre)>|[^`]*`))', flags=re.A)
snappy_url_regex = re.compile('<a href="(https?:\/\/.+?)".*?>(.+?)<\/a>', flags=re.A)
snappy_youtube_regex = re.compile('<lite-youtube videoid="(.+?)" params="autoplay=1', flags=re.A)
email_regex = re.compile('[A-Za-z0-9._%+-]{1,64}@[A-Za-z0-9.-]{2,63}\.[A-Za-z]{2,63}', flags=re.A)