print-debugging

pull/200/head
Aevann 2023-09-12 22:55:05 +03:00
parent b2c17d1701
commit 4b1fb5eec1
1 changed files with 2 additions and 0 deletions

View File

@ -39,9 +39,11 @@ def get_mentions(cache, queries, reddit_notifs_users=False):
for query in queries:
url = f'https://api.pullpush.io/reddit/search/{kind}?q={query}'
print(url, flush=True)
try: req = requests.get(url, headers=HEADERS, timeout=5, proxies=proxies)
except: return []
data += req.json()['data']
if query == 'rdrama': print(req.json()['data'])
data = sorted(data, key=lambda x: int(x['created_utc']), reverse=True)