View Single Post
Old 08-27-2012, 09:42 AM   #1
forceps
Enthusiast
forceps doesn't litterforceps doesn't litter
 
Posts: 26
Karma: 168
Join Date: May 2005
Location: Wuhan, China
Device: Kindle DXG
recipe problem with space in cover url

the ebook-convert fail to retrive a cover image because there is a space in the url:
"http://cdn.theatlantic.com/static/newsroom/img/2012/08/20/0912 Cover_210x280/mag-issue-large.jpg?m92if7"
so far this problem can be bypassed by modify the cover url in recipe, for example,
change
Code:
self.cover_url = cover['src']
to
Code:
from urlib import quote
self.cover_url = quote(cover['src'], safe="%/:=&?~#+!$,;'@()*[]")
would it be better to fix this in ebook-convert itself?
forceps is offline   Reply With Quote