mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
News download: Correctly handle URLs with non ASCII characters in them
This commit is contained in:
parent
b0eb97c60a
commit
6ae6e2ffed
@ -188,7 +188,8 @@ class RecursiveFetcher(object):
|
||||
delta = time.time() - self.last_fetch_at
|
||||
if delta < self.delay:
|
||||
time.sleep(delta)
|
||||
if re.search(r'\s+|,', url) is not None:
|
||||
if isinstance(url, unicode):
|
||||
url = url.encode('utf-8')
|
||||
purl = list(urlparse.urlparse(url))
|
||||
for i in range(2, 6):
|
||||
purl[i] = quote(purl[i])
|
||||
|
Loading…
x
Reference in New Issue
Block a user