Questions tagged [ghost.py]

Ghost is a webkit client written in Python, it provides people making a Python based application to access web applications.

Ghost

Ghost is a webkit client coded in and written by jeanphix,

usage

from ghost import Ghost
ghost = Ghost()
page, extra_resources = ghost.open("http://jeanphi.fr")

Resources

68 questions
6
votes
2 answers

How can I run casperjs javascript tests from Jenkins?

I've written some casperjs tests to test my Django application. If the Django application is started (on port 8000 for example), casperjs can be run as a separate process and access my running Django app. My other tests are written with Django's…
ivy
  • 5,539
  • 1
  • 34
  • 48
5
votes
2 answers

Why isn't Ghost.py loading/running my Javascript?

Ghost.py is supposed to run JS: http://jeanphix.me/Ghost.py/ require.js gets fetched over http, but as far as I can tell it doesn't get run, since "js/main.built" never gets fetched and none of its specified JS files get loaded. It all works…
Seán Hayes
  • 4,060
  • 4
  • 33
  • 48
4
votes
1 answer

Ghost doesn't work

I'm trying to use the example code from his own website and it does not work at all: from ghost import Ghost ghost = Ghost() page, resources = ghost.open('http://google.com') It's a quite simple example and this is the traceback : AttributeError:…
Ralk
  • 443
  • 1
  • 6
  • 17
4
votes
1 answer

Test failures ("no transaction is active") with Ghost.py

I have a Django project that does some calculations in Javascript. I am using Ghost.py to try and incorporate efficient tests of the Javascript calculations into the Django test suite: from ghost.ext.django.test import GhostTestCase class…
supervacuo
  • 9,072
  • 2
  • 44
  • 61
4
votes
1 answer

Ghost.py return list of forms

Ive just installed Ghost.py in order to scrape some site that require me to have javascript. Is there anyway to get an iterable list of forms on the current page much like the mechanize module would with mechanize.Browser().forms()? Or if not can I…
J.Miller
  • 161
  • 1
  • 1
  • 6
4
votes
1 answer

Ghost.py not finding PySide?

I'm trying to get started with the Ghost.py headless browser on a Mac. I installed Ghost.py and its dependencies using these links/commands: Qt 5.0.1 for Mac, has a GUI installer PySide 1.1.0, which requires Qt Version >= 4.7.4, has a GUI…
solvingPuzzles
  • 8,541
  • 16
  • 69
  • 112
3
votes
1 answer

binding is not defined while using Ghost.py

I am writing a script and having trouble even getting a basic one to work. Ghost seems to not be importing properly. I keep getting the following error: >>>from ghost import Ghost File "/Library/Python/2.7/site-packages/ghost/__init__.py", line 1,…
Zaheer
  • 2,794
  • 5
  • 28
  • 33
3
votes
3 answers

Python Strange Issues with Ghost.py

Hello stackoverflow community once again. I have yet another question. Recently, I've found a python library that looked rather useful to me for a recent project by the name of Ghost.py. This library is a net library. The issue I'm having is a…
NAME__
  • 625
  • 1
  • 7
  • 17
2
votes
1 answer

Code behaves different in IDLE and in py script - ghost.py

from ghost import Ghost running it from IDLE works; but if I run a py file with only this line of code it get this error. Traceback (most recent call last): File "C:\Users\Teo1\Desktop\sub\ghost.py", line 1, in from ghost import…
matteo_c
  • 1,990
  • 2
  • 10
  • 20
2
votes
0 answers

AttributeError: 'Ghost' object has no attribute 'click'

I'm trying to click on an element in a headless browser using the ghost library of python like so: ghost = Ghost() USERAGENT = "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0" with ghost.start(): session =…
goose
  • 2,502
  • 6
  • 42
  • 69
2
votes
0 answers

ghost.py: headers are not present in the request

I'm using ghost.py to get the output of an html page and render it to a png. The page is on a node.js/express server and it needs authentication (with jwt) The problem is that I can't understand if the headers are sent or not. Here is a snippet to…
Daniele P.
  • 228
  • 4
  • 16
2
votes
1 answer

"TypeError: 'null' is not an object" when first time execute code

Ghost is giving me this error when I execute fallowing code: from ghost import Ghost from bs4 import BeautifulSoup url = "https://wyszukiwarkaregon.stat.gov.pl/appBIR/index.aspx" ghost = Ghost() page, resources =…
2
votes
1 answer

Is there a way to open the same page of ghost.py in browser?

So I'm opening some page with ghost.py ghost.open('http://someUrl.com') ghost.wait_for_page_loaded() ghost.show() ghost.wait_for_text('some text here') after that user goes to somewhere, so I don't know the url and don't know the action.is…
Shekspir
  • 87
  • 2
  • 12
2
votes
1 answer

Python.exe appcrash with Ghost.py

I'm using Ghost.py from ghost import Ghost url = "http://www.kiev.prom.ua" gh = Ghost() page, page_name = gh.create_page() page_resource = page.open(url, wait_onload_event=True) When I run the above script, Python…
Valeriy Gaydar
  • 500
  • 1
  • 6
  • 26
2
votes
1 answer

There was an error installation the ghost.py

Downloading/unpacking ghost.py Could not find a version that satisfies the requirement ghost.py (from versions: 0.1a, 0.1a2, 0.1a3, 0.1b, 0 .1b2) Cleaning up... No distributions matching the version for ghost.py Storing complete log in…
ethan
  • 31
  • 3
1
2 3 4 5