Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Written in Python. Add links you want to archive in the list array.
- import requests
- import re
- import sys
- import time
- import urllib
- list = [
- 'https://runescape.com',
- 'https://google.com'
- ]
- headers = {
- "Host": "archive.is",
- "Connection": "keep-alive",
- "Content-Length": "150",
- "Cache-Control": "max-age=0",
- "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
- "Origin": "http://archive.is",
- "Upgrade-Insecure-Requests": "1",
- "User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36",
- "Content-Type": "application/x-www-form-urlencoded",
- "Referer": "http://archive.is/",
- "Accept-Encoding": "gzip, deflate",
- "Accept-Language": "en-US,en;q=0.8"
- }
- f = open('archivelinks.txt', 'r+')
- submiturl = 'http://archive.is/submit/'
- submitid = 'dKcRmqFfNJ3YMmqus%2B8VHtMyZn8jImBpRzGaTfX6jknvpcyUWE1RyIqBMc8uJSO%2B'
- for entry in list:
- payload = 'submitid=' + submitid + ' &url=' + urllib.parse.quote_plus(entry)
- r = requests.post(submiturl, data=payload, headers=headers)
- match = re.search("href=\"http://archive.is/(\w+)", str(r.text))
- if match and match.group(1):
- print('http://www.archive.is/' + match.group(1))
- f.write('http://www.archive.is/' + match.group(1) + '\n')
- time.sleep(2)
Advertisement
Add Comment
Please, Sign In to add comment