I am slowly building a web browser in PyQt4 and like the speed that I am exiting from it. However, I want to combine easylist.txt with it. I believe adblock uses this to block HTTP requests from the browser.
How would you do this using python / PyQt4?
[edit1] OK. I think I configured Privoxy. I do not configure any additional filters and it seems to work. PyQt4, which I tried to use, looks like this:
self.proxyIP = "127.0.0.1"
self.proxyPORT= 8118
proxy = QNetworkProxy()
proxy.setType(QNetworkProxy.HttpProxy)
proxy.setHostName(self.proxyIP)
proxy.setPort(self.proxyPORT)
QNetworkProxy.setApplicationProxy(proxy)
However, this does nothing, and I cannot understand the documents and cannot find any examples.
[edit2] I just noticed that if I change self.proxyIP to my local IP address and not to 127.0.0.1, the page does not load. So something is happening.
source share