|08-27-2012, 08:42 AM||#1|
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:
so far this problem can be bypassed by modify the cover url in recipe, for example,
self.cover_url = cover['src']
from urlib import quote self.cover_url = quote(cover['src'], safe="%/:=&?~#+!$,;'@()*")
|08-27-2012, 03:49 PM||#4|
creator of calibre
Join Date: Oct 2006
Location: Mumbai, India
That assumes that strobj is not already encoded and that all characters in the string are encode safe. For example, if you did what you suggest on the the OPs URL you will get an invalid result because the ? will be quoted.
URL quoting is well defined, the status of the string that you are trying to quote and the level of quoting that the server that you are trying to connect to requires are not.
Last edited by kovidgoyal; 08-27-2012 at 03:56 PM.
|Thread Tools||Search this Thread|
|Thread||Thread Starter||Forum||Replies||Last Post|
|Lost trying to get url for time.com cover||Olger||Recipes||3||02-14-2012 09:04 AM|
|HTML Meta tag for cover image URL?||MrPLD||Conversion||5||01-29-2012 12:15 AM|
|Los Tiempos, Bolivia cover URL||pietvo||Recipes||1||10-18-2011 02:20 PM|
|Simple download from rss url recipe||BloodOmen||Recipes||0||02-16-2011 09:21 PM|
|Space.com recipe - text is invisible!||Tridens92||Recipes||2||01-31-2011 10:55 AM|