replace space in url with %20
This commit is contained in:
parent
19c52e22a4
commit
13d333f841
1 changed files with 1 additions and 0 deletions
|
@ -56,6 +56,7 @@ def read_url(url, headers=DEFAULT_HEADERS, blocking=True):
|
||||||
False, returns an iterator which gives None until a successful read,
|
False, returns an iterator which gives None until a successful read,
|
||||||
at which point the str page contents is yielded.
|
at which point the str page contents is yielded.
|
||||||
"""
|
"""
|
||||||
|
url = url.replace(' ', '%20')
|
||||||
req = urllib2.Request(url, None, headers)
|
req = urllib2.Request(url, None, headers)
|
||||||
f = urllib2.urlopen(req)
|
f = urllib2.urlopen(req)
|
||||||
data = f.read()
|
data = f.read()
|
||||||
|
|
Loading…
Reference in a new issue