mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04: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
@ -225,6 +225,8 @@ class MetadataSingleDialog(QDialog, Ui_MetadataSingleDialog):
|
|||||||
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:
|
||||||
|
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.')
|
raise Exception('ISBN: '+isbn+' not found.')
|
||||||
url = url.find('img')
|
url = url.find('img')
|
||||||
if url is None:
|
if url is None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user