This commit is contained in:
Kovid Goyal 2008-04-03 21:00:54 +00:00
parent fa52708579
commit 3c5dfb5c2b

View File

@ -48,9 +48,7 @@ def cover_from_isbn(isbn, timeout=5.):
url = url.find('img')
if url is None:
raise LibraryThingError(_('Server error. Try again later.'))
print url['src']
url = re.sub(r'_SX\d+', '', url['src'])
print url
cover_data = browser.open(url).read()
return cover_data, url.rpartition('.')[-1]
finally: