Skip to content

Instantly share code, notes, and snippets.

@gregjurman
Created September 7, 2013 20:14
Show Gist options
  • Save gregjurman/6478887 to your computer and use it in GitHub Desktop.
Save gregjurman/6478887 to your computer and use it in GitHub Desktop.
untested, cron script for reading in csv and making screenshots.
#!/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