dont use proxy needlessly
parent
772721fdbc
commit
871cd07548
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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']
|
||||
|
||||
|
|
Loading…
Reference in New Issue