Last active
August 29, 2015 14:21
-
-
Save jackfischer/9a60ba04ca603d9f1468 to your computer and use it in GitHub Desktop.
Quickly pipe a list of pages into Archive.org's Wayback Machine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from selenium import webdriver | |
import re, time | |
driver = webdriver.Firefox() | |
regex = re.compile("https?://([\S]+)") | |
for line in open ('FILE.txt', 'r'): | |
m = regex.search(line) | |
if m != None: | |
wayback = "https://web.archive.org/save/" + m.group(1) | |
print wayback | |
driver.get(wayback) | |
time.sleep(10) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment