homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: urllib2.Request constructor to urllib.quote the url given
Type: Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, nkour
Priority: normal Keywords:

Created on 2006年04月20日 14:02 by nkour, last changed 2022年04月11日 14:56 by admin. This issue is now closed.

Messages (4)
msg28315 - (view) Author: Nikos Kouremenos (nkour) Date: 2006年04月20日 14:02
urllib2.Request('http://www.google.com/search?client=firefox&q=foo
bar', None)
this fails. it shouldn't
msg28316 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006年04月28日 19:19
Logged In: YES 
user_id=849994
I don't know what your problem is. This works perfectly for me:
>>> r =
urllib2.Request("http://www.google.com/search?client=firefox&q=foobar",
None)
>>> o = urllib2.HTTPHandler()
>>> u = o.http_open(r)
>>> u.read()
"..."
Closing as "Works for me". If you have another problem,
please reopen
msg28317 - (view) Author: Nikos Kouremenos (nkour) Date: 2006年04月29日 11:34
Logged In: YES 
user_id=865368
it's foo bar not foobar. and space should be automatcally
become %20 (urllib.quote()) but it doesn't. please reopen
msg28318 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006年04月30日 09:25
Logged In: YES 
user_id=849994
The docs say that the argument to the Request constructor
must be a valid URL. A valid URL doesn't contain spaces, so
the behavior is consistent.
History
Date User Action Args
2022年04月11日 14:56:16adminsetgithub: 43255
2006年04月20日 14:02:58nkourcreate

AltStyle によって変換されたページ (->オリジナル) /