Ghost.py icon indicating copy to clipboard operation
Ghost.py copied to clipboard

Is the documentation uptodate?

Open paintdog opened this issue 9 years ago • 2 comments

The examples in the documentation didn't worked for me. I looked at the source and then I tried the following lines, which did the job:

`from ghost import Ghost, Session

ghost = Ghost()

ghost = Session(ghost)

ghost.open('http://www.google.com')

ghost.capture_to('screen_shot.png')`

Nice tool, this example maybe helpful for others - I hope.

paintdog avatar Jul 28 '16 21:07 paintdog

This one is working and the one in the documentation doesn't. Thanks..

isurusam avatar Aug 09 '16 09:08 isurusam

I get an appcrash from python :( - Tried so much, if I take the code from here http://ghost-py.readthedocs.io/en/latest/#installation It works, but If I change the URL, appcrash from python.exe Code:

from ghost import Ghost
ghost = Ghost()

with ghost.start() as session:
    page, extra_resources = session.open("http://google.com")
    assert page.http_status == 200 and 'jeanphix' in page.content

The funny part is, that the code you post save the screen_shot.png, but crashes...

GrexAut avatar Sep 15 '16 10:09 GrexAut