Segmentation fault for some particular websites
For some websites, python is throwing segmentation fault:
2015-10-07T18:50:43.274Z [WARNING ] QT: QFont::setPixelSize: Pixel size <= 0 (0) 2015-10-07T18:50:43.310Z [WARNING ] QT: QFont::setPixelSize: Pixel size <= 0 (0) Segmentation fault: 11
Following is the test Script used:
from ghost import Ghost
ghost = Ghost()
with ghost.start() as session:
session.show()
page, extra_resources = session.open("http://ebay.com")
session.show()
session.wait_for_page_loaded()
Python Version : 2.7.10 (OS X Yosemite Version 10.10.3 (14D136))
I can confirm the segmentation fault. Debian "testing" on amd64, Python 2.7.9 or 3.4.3, PySide 1.2.2.
Can we open this web page without loading any image or css ? If yes , could you please tell me how ?
@NKaushik89 you can use the exclude argument as shown here: https://github.com/jeanphix/Ghost.py/commit/127d2ab3cff54fcf804078fe78c319654ac375f2#diff-4d1bd3fdfc67d35993565f52590bd28fR449
session = ghost.start(exclude="\.(js|css)$")
Thank you ~
After excluding js, (exclude=".(js)$") , it is working for some sites. With one error :
undefined(0): ReferenceError: Can't find variable: $
Also, cann't we use the following API's to fill form data ? :
session.set_field_value("input[name=username]", "username")
AND
session.fill("form", {
"username": "username",
"password": "password",})
Confirmed : this issue is only with js enabled sites
reproduce the same error, even i exclude the js and css files, the python will still crashed. #245
I am facing the same issue although I am not excluding js and css. I need these files for my experiment.
Any quick fix for this?
@Ashish1805 I met the same question,I need data from JS,have you fix it?
I am having the exact same issue.
After excluding js, (exclude=".(js)$") , it is working for some sites. With one error :
undefined(0): ReferenceError: Can't find variable: $
@NKaushik89 This is most likely because the website is using jQuery that you just forbid from downloading.