urllib2.urlopen issue

Aahz aahz at pythoncraft.com
Wed Jun 24 14:11:27 EDT 2009


In article <854313cf-6323-4ca9-b883-65ca8f414d96 at v23g2000pro.googlegroups.com>,
David  <Wwy58 at yahoo.com> wrote:
>
>import urllib2
>url = 'http://query.directrdr.com/ptrack?pid=225&v_url=http://
>www.plentyoffish.com&keyword=flowers&feed=1&ip=12.2.2.2&said=$said'
>xml = urllib2.urlopen(url).read()
>
>then I get an exception of
>
> File "/usr/lib/python2.5/urllib2.py", line 1082, in do_open
>    raise URLError(err)
>urllib2.URLError: <urlopen error (-2, 'Name or service not known')>
>
>I think this is caused by the embedded "v_url=..." in the url.

urllib.quote_plus()
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"as long as we like the same operating system, things are cool." --piranha



More information about the Python-list mailing list