Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example of url that returns None #151

Closed
jakeogh opened this issue Feb 17, 2014 · 2 comments
Closed

Example of url that returns None #151

jakeogh opened this issue Feb 17, 2014 · 2 comments

Comments

@jakeogh
Copy link

jakeogh commented Feb 17, 2014

The example link below loads in firefox or webkit.

#!/usr/bin/env python3.3

#versions: 
#       Pyside 1.2.1-r1
#       Ghost.py (github latest @ https://github.com/jeanphix/Ghost.py)

from ghost import Ghost

def test_ghost(uri):
        ghost = Ghost(wait_timeout=999)
        page, resources = ghost.open(uri)

        print("type(page.content):", type(page.content))
        print("page.content:", page.content)    #None, why?
        print("len(resources):", len(resources)) #page resources are loading

if __name__ == '__main__':
        test_ghost('http://www.mymodernmet.com/profiles/blogs/3d-gifs')
@jakeogh
Copy link
Author

jakeogh commented May 12, 2014

Updated example:


#!/usr/bin/env python2.7

from ghost import Ghost

uri='http://kukuruku.co/hub/cpp/lock-free-data-structures-basics-atomicity-and-atomic-primitives'

ghost = Ghost(wait_timeout=999)
page, resources = ghost.open(uri)
ghost.wait_for_page_loaded()

print "page.content:", page.content             #'None' (unicode string)
print "type(page.content):", type(page.content) #'unicode'

print "len(resources):", len(resources)
#page resources are loading, why is 'None' returned by ghost.open()?

@rfmcpherson
Copy link

Both examples are working for me using version 0.1b5 and PySide

@jakeogh jakeogh closed this as completed Jan 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants