This commit is contained in:
Aevann1 2022-02-24 11:24:54 +02:00
parent 1c7b081231
commit 0aff3d5552

View file

@ -785,7 +785,7 @@ def thumbnail_thread(pid):
notif = Notification(comment_id=new_comment.id, user_id=admin.id)
db.add(notif)
k,val = random.choice(REDDIT_NOTIFS.items())
k,val = random.choice(tuple(REDDIT_NOTIFS.items()))
for i in requests.get(f'https://api.pushshift.io/reddit/{t}/search?html_decode=true&q={k}&size=1').json()["data"]:
try: body_html = sanitize(f'New mention of you: https://old.reddit.com{i["permalink"]}?context=89', noimages=True)
except: continue