Take a screenshot from a website from commandline or with python
Question: i will take a screenshot from this page:
[http://books.google.de/books?id=gikDAAAAMBAJ&pg=PA1&img=1&w=2500](http://books.google.de/books?id=gikDAAAAMBAJ&pg=PA1&img=1&w=2500)
or save the image that it outputs.

But i can't find a way. With wget/curl i get an "unavailable error" and also
with others tools like webkit2png/wkhtmltoimage/wkhtmltopng.

Is there a clean way to do it with python or from commandline?

Best regards!


Answer: You can use ghost.py if you like. <http://jeanphix.me/Ghost.py/>

Here is an example of how to use it.

    
    
    from ghost import Ghost
    ghost = Ghost(wait_timeout=4)
    ghost.open('http://www.google.com')
    ghost.capture_to('screen_shot.png')
    

The last line saves the image in your current directory.

Hope this helps

