mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #2255 (calibre does not handle images with comma in their name)
This commit is contained in:
parent
74cf23ddc8
commit
596b52afac
@ -179,8 +179,11 @@ class RecursiveFetcher(object, LoggingInterface):
|
|||||||
delta = time.time() - self.last_fetch_at
|
delta = time.time() - self.last_fetch_at
|
||||||
if delta < self.delay:
|
if delta < self.delay:
|
||||||
time.sleep(delta)
|
time.sleep(delta)
|
||||||
if re.search(r'\s+', url) is not None:
|
if re.search(r'\s+|,', url) is not None:
|
||||||
url = quote(url)
|
purl = list(urlparse.urlparse(url))
|
||||||
|
for i in range(2, 6):
|
||||||
|
purl[i] = quote(purl[i])
|
||||||
|
url = urlparse.urlunparse(purl)
|
||||||
with self.browser_lock:
|
with self.browser_lock:
|
||||||
try:
|
try:
|
||||||
with closing(self.browser.open(url)) as f:
|
with closing(self.browser.open(url)) as f:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user