"Jack" <[EMAIL PROTECTED]> writes:
>>> I'm trying to use a proxy server with urllib2.
>>> So I have managed to get it to work by setting the environment
>>> variable:
>>> export HTTP_PROXY=127.0.0.1:8081
>>>
>>> But I wanted to set it from the code. However, this does not set the
>>> proxy:
>>>
>> I'm trying to use a proxy server with urllib2.
>> So I have managed to get it to work by setting the environment
>> variable:
>> export HTTP_PROXY=127.0.0.1:8081
>>
>> But I wanted to set it from the code. However, this does not set the
>> proxy:
>> httpproxy = '127.0.0.1:3129'
>> prox
"Jack" <[EMAIL PROTECTED]> writes:
> Rob,
>
> I tried your code snippet and it worked great. I'm just wondering if
> getopener( ) call
> is lightweight so I can just call it in every call to fetchurl( )? Or I
> should try to share
> the opener object among fetchurl( ) calls?
Creating an opener
Rob,
I tried your code snippet and it worked great. I'm just wondering if
getopener( ) call
is lightweight so I can just call it in every call to fetchurl( )? Or I
should try to share
the opener object among fetchurl( ) calls?
Thanks,
Jack
"Rob Wolfe" <[EMAIL PROTECTED]> wrote in message
new
> Works for me.
> How do you know that the proxy is not set?
The proxy drops some URLs and the URLs were not being dropped when I did
this :)
> Try this:
Thank you. I'll give it a try.
--
http://mail.python.org/mailman/listinfo/python-list
"Jack" <[EMAIL PROTECTED]> writes:
> I'm trying to use a proxy server with urllib2.
> So I have managed to get it to work by setting the environment
> variable:
> export HTTP_PROXY=127.0.0.1:8081
>
> But I wanted to set it from the code. However, this does not set the proxy:
> httpproxy = '127
I'm trying to use a proxy server with urllib2.
So I have managed to get it to work by setting the environment
variable:
export HTTP_PROXY=127.0.0.1:8081
But I wanted to set it from the code. However, this does not set the proxy:
httpproxy = '127.0.0.1:3129'
proxy_support = urllib2.ProxyHan