forked from rDrama/rDrama
1
0
Fork 0

run archival through proxy

master
Aevann1 2022-10-31 02:05:53 +02:00
parent cdffb764bd
commit df559c6af5
1 changed files with 2 additions and 2 deletions

View File

@ -31,9 +31,9 @@ def badge_grant(user, badge_id, description=None, url=None, notify=True):
headers = {'User-Agent': 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)'}
def archiveorg(url):
try: requests.get(f'https://web.archive.org/save/{url}', headers=headers, timeout=10)
try: requests.get(f'https://web.archive.org/save/{url}', headers=headers, timeout=10, proxies=proxies)
except: pass
requests.post('https://ghostarchive.org/archive2', data={"archive": url}, headers=headers, timeout=10)
requests.post('https://ghostarchive.org/archive2', data={"archive": url}, headers=headers, timeout=10, proxies=proxies)
def archive_url(url):