remove unnecessary youtube archival that doesnt even work
parent
1aa00c3a30
commit
efa82d4c32
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue