Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

proxy not working with https: pages. #16

Closed
matkor opened this Issue · 0 comments

2 participants

@matkor

Hi!
I am trying to use proxy for my SSL requests.
Default way
browser.set_proxy()
seems to work for http: requests only, leaving https to go directly.

As workaround I set proxy globally:
proxy = QtNetwork.QNetworkProxy(QtNetwork.QNetworkProxy.HttpProxy, PROXY_HOST,
without calling browser.set_proxy() and than it seems to work.

Example code:
#! /usr/bin/python
PROXY_HOST = "put.proxy.here"
PROXY_PORT = 3128
PROXY = "http://%s:%d" % (PROXY_HOST, PROXY_PORT, )

if 0:
from PyQt4 import QtNetwork
proxy = QtNetwork.QNetworkProxy(QtNetwork.QNetworkProxy.HttpProxy, PROXY_HOST, PROXY_PORT)
QtNetwork.QNetworkProxy.setApplicationProxy(proxy)

import spynner
import pyquery

browser = spynner.Browser(debug_level=spynner.INFO)
if 1:
browser.set_proxy("PROXY")

browser.create_webview()
browser.show()

browser.load("http://www.whatismyip.com/", load_timeout=30)
browser.browse()

@kiorky kiorky closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.