Created
September 7, 2013 20:14
-
-
Save gregjurman/6478887 to your computer and use it in GitHub Desktop.
untested, cron script for reading in csv and making screenshots.
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
#!/usr/bin/python | |
import csv | |
from hashlib import md5 | |
from selenium import webdriver | |
with open("/path/to/csvfile") as csv_in: | |
browser = webdriver.Firefox() | |
data = csv.reader(csv_in) | |
for url in data: | |
browser.get(url) | |
browser.save_screenshot("/tmp/screen-cache/"+md5(data).hexdigest()+'.png') | |
browser.quit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment