jeanphix/Ghost.py

'Ghost' object has no attribute 'open'

ReusChen opened this issue · 1 comments

when i use the open(url, wait_onload_event=True), then it will throw this error 'Ghost' object has no attribute 'open'

This confused me as well. You have to use it it like this:

import ghost

g = ghost.Ghost()
with g.start() as session:
    page, extra_resources = session.open("https://www.debian.org")
    if page.http_status == 200 and \
            'The Universal Operating System' in page.content:
        print("Good!")