mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-22 01:24:43 +02:00
Detect when librarything.com is experiencing high load and give appropriate error message. Fixes #436
This commit is contained in:
parent
0b088b7eac
commit
be6ee664c3
1 changed files with 2 additions and 0 deletions
|
|
@ -225,6 +225,8 @@ def fetch_cover(self):
|
|||
s = BeautifulSoup(src)
|
||||
url = s.find('td', attrs={'class':'left'})
|
||||
if url is None:
|
||||
if s.find('div', attrs={'class':'highloadwarning'}) is not None:
|
||||
raise Exception('Could not fetch cover as server is experiencing high load. Please try again later.')
|
||||
raise Exception('ISBN: '+isbn+' not found.')
|
||||
url = url.find('img')
|
||||
if url is None:
|
||||
|
|
|
|||
Loading…
Reference in a new issue