mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix nasty typo that broke cover fetching in 0.4.135
This commit is contained in:
parent
e0d23eb5c3
commit
dcd258b52b
@ -43,8 +43,9 @@ def cover_from_isbn(isbn, timeout=5.):
|
|||||||
src = browser.open('http://www.librarything.com/isbn/'+isbn).read().decode('utf-8', 'replace')
|
src = browser.open('http://www.librarything.com/isbn/'+isbn).read().decode('utf-8', 'replace')
|
||||||
except Exception, err:
|
except Exception, err:
|
||||||
if isinstance(getattr(err, 'args', [None])[0], socket.timeout):
|
if isinstance(getattr(err, 'args', [None])[0], socket.timeout):
|
||||||
raise LibraryThingError(_('LibraryThing.com timed out. Try again later.'))
|
err = LibraryThingError(_('LibraryThing.com timed out. Try again later.'))
|
||||||
raise
|
raise err
|
||||||
|
else:
|
||||||
s = BeautifulSoup(src)
|
s = BeautifulSoup(src)
|
||||||
url = s.find('td', attrs={'class':'left'})
|
url = s.find('td', attrs={'class':'left'})
|
||||||
if url is None:
|
if url is None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user