dont use proxy needlessly

pull/216/head
Aevann 2023-10-24 18:15:49 +03:00
parent 772721fdbc
commit 871cd07548
2 changed files with 3 additions and 3 deletions

View File

@ -27,10 +27,10 @@ from files.routes.routehelpers import check_for_alts
def _archiveorg(url):
try:
requests.post('https://ghostarchive.org/archive2', data={"archive": url}, headers=HEADERS, timeout=10, proxies=proxies)
requests.post('https://ghostarchive.org/archive2', data={"archive": url}, headers=HEADERS, timeout=10)
except: pass
try:
requests.get(f'https://web.archive.org/save/{url}', headers=HEADERS, timeout=10, proxies=proxies)
requests.get(f'https://web.archive.org/save/{url}', headers=HEADERS, timeout=10)
except: pass

View File

@ -34,7 +34,7 @@ def get_mentions(cache, queries, reddit_notifs_users=False):
for kind in ('submission', 'comment'):
q = " or ".join(queries)
url = f'https://api.pullpush.io/reddit/search/{kind}?q={q}'
try: req = requests.get(url, headers=HEADERS, timeout=5, proxies=proxies)
try: req = requests.get(url, headers=HEADERS, timeout=5)
except: return []
data = req.json()['data']