remotes/1693045480750635534/spooky-22
Aevann1 2022-04-10 18:27:27 +02:00
parent de6dbead0d
commit c0c0b3a134
2 changed files with 0 additions and 8 deletions

View File

@ -731,8 +731,6 @@ snappy_url_regex = re.compile('<a href=\"(https?:\/\/[a-z]{1,20}\.[\w:~,()\-.#&\
email_regex = re.compile('([A-Za-z0-9]+[.-_])*[A-Za-z0-9]+@[A-Za-z0-9-]+(\.[A-Z|a-z]{2,100})+', flags=re.A)
reddit_post_regex = re.compile('https:\/\/old\.reddit\.com\/r\/\w{1,30}\/comments\/([a-z0-9]+)(\/\w{0,100})?', flags=re.A)
utm_regex = re.compile('utm_[a-z]+=[a-z0-9_]+&', flags=re.A)
utm_regex2 = re.compile('[?&]utm_[a-z]+=[a-z0-9_]+', flags=re.A)

View File

@ -844,9 +844,6 @@ def api_is_repost():
url = urlunparse(new_url)
if url.endswith('/'): url = url[:-1]
if reddit_post_regex.fullmatch(url):
url = reddit_post_regex.sub(r'https://old.reddit.com/\1', url)
search_url = url.replace('%', '').replace('\\', '').replace('_', '\_').strip()
repost = g.db.query(Submission).filter(
@ -947,9 +944,6 @@ def submit_post(v, sub=None):
url = urlunparse(new_url)
if url.endswith('/'): url = url[:-1]
if reddit_post_regex.fullmatch(url):
url = reddit_post_regex.sub(r'https://old.reddit.com/\1', url)
search_url = url.replace('%', '').replace('\\', '').replace('_', '\_').strip()
repost = g.db.query(Submission).filter(