This commit is contained in:
Aevann1 2022-01-30 15:40:11 +02:00
parent 40a08186bd
commit 88d635e03d
6 changed files with 11 additions and 11 deletions

View file

@ -666,7 +666,7 @@ def thumbnail_thread(pid):
for term in ('rdrama','freeghettohoes.biz'):
for i in requests.get(f'https://api.pushshift.io/reddit/{t}/search?html_decode=true&q={term}&size=100').json()["data"]:
body_html = sanitize(f'New rdrama mention: https://old.reddit.com{i["permalink"]}?context=99', noimages=True)
body_html = sanitize(f'New rdrama mention: https://old.reddit.com{i["permalink"]}?context=89', noimages=True)
existing_comment = db.query(Comment.id).filter_by(author_id=NOTIFICATIONS_ID, parent_submission=None, distinguish_level=6, body_html=body_html, level=1, sentto=0).first()
@ -689,7 +689,7 @@ def thumbnail_thread(pid):
for k,v in REDDIT_NOTIFS.items():
for i in requests.get(f'https://api.pushshift.io/reddit/{t}/search?html_decode=true&q={k}&size=100').json()["data"]:
try: body_html = sanitize(f'New mention of you: https://old.reddit.com{i["permalink"]}?context=99', noimages=True)
try: body_html = sanitize(f'New mention of you: https://old.reddit.com{i["permalink"]}?context=89', noimages=True)
except: continue
existing_comment = db.query(Comment.id).filter_by(author_id=NOTIFICATIONS_ID, parent_submission=None, distinguish_level=6, body_html=body_html).first()
if existing_comment: break