proxy in urlopen()
Nick Vargish
nav+posts at bandersnatch.org
Tue May 18 15:04:15 EDT 2004
"Egor Bolonev" <ebolonev at bonbon.net> writes:
> AssertionError: proxies must be a mapping
This is telling you proxies must be a mapping type, in this case, a
dictionary. So try replacing:
> a=urlopen('url', proxies=('127.0.0.1:3128'))
With this:
a=urlopen('url', proxies={ 'http': '127.0.0.1:3128' })
HTH,
Nick
--
# sigmask || 0.2 || 20030107 || public domain || feed this to a python
print reduce(lambda x,y:x+chr(ord(y)-1),' Ojdl!Wbshjti!=obwAcboefstobudi/psh?')
More information about the Python-list
mailing list