R: http connection via proxy server
Luca Calderano
calderano at sgaspa.it
Fri Jun 13 06:33:04 EDT 2003
Great! it works....
thanks a lot.
Luca Calderano
Fredrik Lundh wrote:
>does this work better?
>
> import os
> import urllib
>
> os.environ["http_proxy"] = "http://xxx.xxx.xxx.xxx:80"
> myurl =
"http://securityresponse.symantec.com/avcenter/download/pages/US-N95.html"
> page = urllib.urlopen(myurl).read()
Luca Calderano wrote:
> I'm trying to connect to a web page via my proxy server
> using the following code
>
> ..............................
> import os
> import httplib
>
> os.system("Set %http_proxy% = \\xxx.xxx.xxx.xxx:80")
> myurl =
"securityresponse.symantec.com/avcenter/download/pages/US-N95.html"
> req=httplib.HTTP(myurl)
> req.putrequest("GET","/")
> req.endheaders()
> ................................
More information about the Python-list
mailing list