urllib2, proxy, basic authentication

Albert Chin-A-Young china at the.web.com
Tue Dec 5 21:26:49 EST 2000


Jeremy Lamplough <jeremy.lamplough at motorola.com> wrote:
> try setting the proxy host prior to importing the other modules.

> import os, sys
> os.environ['http_proxy'] = 'http://[PROXY_HOST]:5865'
> import urllib2
> from urllib2 import urlopen

> The way i'm doing basic stuff, with NO authentication is (to download a
> stock quote)

We don't have a problem with http_proxy and the remote host not
requiring authentication. However, if the remote host does require
authentication, then we have our problem.

-- 
albert chin (china @at@ thewrittenword .dot. com)



More information about the Python-list mailing list