Skip to content
Webkit based scriptable web browser for python.
Branch: dev
Clone or download
jeanphix Merge pull request #325 from rcoh/patch-1
Allow timeout to be passed to session functions
Latest commit d0f6c9a May 3, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docker Add a Dockerfile to build dockerhub images Apr 28, 2017
docs fix API docs Jul 17, 2015
ghost Allow timeout to be passed to session functions May 2, 2017
tests Add a Dockerfile to build dockerhub images Apr 28, 2017
.gitignore Feature: added support for collecting popup (confirm/alert/prompt) me… Mar 25, 2013
.gitmodules Removed sphinx config relateds Dec 8, 2011
.travis.yml Add a Dockerfile to build dockerhub images Apr 28, 2017
MANIFEST.in Fixes setup.py & MANIFEST.in Sep 19, 2012
README.rst
setup.cfg Uniformize unittest startup Feb 15, 2017
setup.py Flag current version as alpha Apr 28, 2017

README.rst

ghost.py

Build Status

ghost.py is a webkit web client written in python:

from ghost import Ghost
ghost = Ghost()

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

Installation

ghost.py requires PySide2 Qt5 bindings.

The most convenient way to run ghost is to use the official docker image.

docker run -i -t jeanphix/ghost.py:2.0.0-dev python3

Python 3.5.2 (default, Nov 17 2016, 17:05:23)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from ghost import Ghost
>>> g = Ghost()
>>> with g.start() as session:
...     session.open('http://jeanphix.me')
...
(<ghost.ghost.HttpResource object at 0x7f3a118fa128>, [<ghost.ghost.HttpResource object at 0x7f3a118fa128>, <ghost.ghost.HttpResource object at 0x7f3a118fa0f0>, <ghost.ghost.HttpResource object at 0x7f3a118fa160>, <ghost.ghost.HttpResource object at 0x7f3a118ec4e0>, <ghost.ghost.HttpResource object at 0x7f3a118ecfd0>])
You can’t perform that action at this time.