Skip to content

Instantly share code, notes, and snippets.

@taylorbrooks
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save taylorbrooks/db06564b8eb2bede7a79 to your computer and use it in GitHub Desktop.
Save taylorbrooks/db06564b8eb2bede7a79 to your computer and use it in GitHub Desktop.
Screenshots
import subprocess
from urlparse import urlparse
from pngquant import tiny
def webkit2png(name, site):
subprocess.call(['webkit2png', '-F', '-W', '1440', '-D', 'screenshots', '-o', name, site])
sites = []
for site in sites:
url = urlparse(site)[1]
if url.startswith('www.'):
pUrl = url.split('www.')[1]
else:
pUrl = url
bizName = pUrl.split('.')[0].lower()
print site
webkit2png(bizName, site)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment