How to use a proxy in python and twisted to get a page
Is it true that if you have a proxy such as http://222.126.99.99:8909 that you can access a url from the browser e.g. www.cnn.com as http://222.126.99.99:8909/www.cnn.com.
Is this is true, from twisted can I use the proxy to get a page as follows?
iUrl=http://222.126.99.99:8909/www.cnn.com
client.getPage(iUrl,method='GET').addCallback(self.processPage,iUrl).addErrback(self.printError,iUrl)
if the proxy requires a username and password..how do I do modify the URL to use the credentials?
The format is:
url = 'http://username:password@host:port/path'
Though it is deprecated.
Note, it is not safe to send your username and password over http.
精彩评论