Ghost.py is a webkit web client written in python
jeanphix.me
jeanphix.me
http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/q...
E.g. I use Qt 4.8 (via PyQt 4.9) and thus I have WebKit trunk from 2011-05-05 (r85855).
There is also PyQt4.QtWebKit.qWebKitVersion().
If you have the Qt source at hand, check src/3rdparty/webkit/VERSION.
* https://github.com/jeanphix/Ghost.py/blob/master/ghost/ghost...
* https://github.com/jeanphix/Ghost.py/blob/master/ghost/utils...
If you are interested, this is some own code where I just use PyQt4 directly:
* https://github.com/albertz/google-books-export/blob/master/g...
I forget the exact details, but fetching the URL just kicked off a job on their server and returned some Javascript to execute. The Javascript did "something" while the data was being fetched/processed on the server, and eventually decided when it could start the real download.
I spent a while trying to figure out the Javascript, but finally came up with the PyQt/WebKit approach.
It's the ugliest download code in the world, but it's up on GitHub: https://github.com/jl2/GIS-Stuff/blob/master/map_download/ne...
I'm not sure how useful something like Ghost would have been. I was basically using it as a glorified urllib.request, though, and it doesn't look like that's the main use case for Ghost.
This ghost.py looks great, I'll give it a go after dinner tonight.
[1] https://github.com/niklasb/dryscrape
Phantomjs has just recently stopped their Python support.
There is a project on github where this was taken a step further via dnode ( https://github.com/sgentle/phantomjs-node ) - you get access to the phantomjs objects, get/set properties and access the phantomjs api methods.
Will certainly have a deeper look into ghost.py