Example of url that returns None #151

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

Projects

None yet

2 participants

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 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()?

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

@jakeogh jakeogh closed this Jan 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment