replace space in url with %20

This commit is contained in:
j 2007-04-06 17:03:24 +00:00
parent 19c52e22a4
commit 13d333f841
1 changed files with 1 additions and 0 deletions

View File

@ -56,6 +56,7 @@ def read_url(url, headers=DEFAULT_HEADERS, blocking=True):
False, returns an iterator which gives None until a successful read,
at which point the str page contents is yielded.
"""
url = url.replace(' ', '%20')
req = urllib2.Request(url, None, headers)
f = urllib2.urlopen(req)
data = f.read()