it has already discussed in this question ghost.py and proxy but the answer does not appear clear to me.
I have ghost installed and also have a proxy( the host is host=http://XXXXXXXX
and port=7676
).
from ghost import Ghost
url = "https://www.google.co.uk"
host = 'http://XXXXXXXX'
port = 7676
ghost = Ghost(wait_timeout=20)
ghost.set_proxy(type_='http', host=host, port=port)
ghost.open(url)
html = ghost.content
But I get an empty html
string. I also tried with ghost.set_proxy(type_='https', host=host, port=port)
but it fails (html
string remains empty).
When home with no proxy, (and thus without the line ghost.set_proxy(type_='http', host=host, port=port)
), it works.
I am udner a Win 64 Bits OS
, with the proxy already settled in Advanced Settings
.
Would you have any idea of what I am missing?