forked from rDrama/rDrama
cvx
parent
c236c195e1
commit
2e5e8b2855
|
@ -663,7 +663,8 @@ def thumbnail_thread(pid):
|
||||||
|
|
||||||
if SITE == 'rdrama.net':
|
if SITE == 'rdrama.net':
|
||||||
for t in ("submission","comment"):
|
for t in ("submission","comment"):
|
||||||
for i in requests.get(f'https://api.pushshift.io/reddit/{t}/search?html_decode=true&q=rdrama&size=10').json()["data"]:
|
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=10').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=99', noimages=True)
|
||||||
|
|
||||||
|
@ -687,11 +688,7 @@ def thumbnail_thread(pid):
|
||||||
db.add(notif)
|
db.add(notif)
|
||||||
|
|
||||||
for k,v in REDDIT_NOTIFS.items():
|
for k,v in REDDIT_NOTIFS.items():
|
||||||
if v == CARP_ID: num = 25
|
for i in requests.get(f'https://api.pushshift.io/reddit/{t}/search?html_decode=true&q={k}&size=10').json()["data"]:
|
||||||
elif v == AEVANN_ID: num = 1
|
|
||||||
elif v == IDIO_ID: num = 10
|
|
||||||
|
|
||||||
for i in requests.get(f'https://api.pushshift.io/reddit/{t}/search?html_decode=true&q={k}&size={num}').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=99', noimages=True)
|
||||||
except: continue
|
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()
|
existing_comment = db.query(Comment.id).filter_by(author_id=NOTIFICATIONS_ID, parent_submission=None, distinguish_level=6, body_html=body_html).first()
|
||||||
|
|
Loading…
Reference in New Issue