command line - Take a screenshot from a website from commandline or with python -


i take screenshot page: http://books.google.de/books?id=gikdaaaambaj&pg=pa1&img=1&w=2500 or save image outputs.

but can't find way. wget/curl "unavailable error" , others tools webkit2png/wkhtmltoimage/wkhtmltopng.

is there clean way python or commandline?

best regards!

sometimes need http headers such user-agent downloads work. in python 2.7, can:

import urllib2 request = urllib2.request(     r'http://books.google.de/books?id=gikdaaaambaj&pg=pa1&img=1&w=2500',     headers={'user-agent':'mozilla/5.0 (x11; u; linux i686) gecko/20071127 firefox/2.0.0.11'}) page = urllib2.urlopen(request)  open('somefile.png','wb') f:     f.write(page.read()) 

or can @ params adding http headers in wget or curl.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -