mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-05 08:40:13 -04:00
...
This commit is contained in:
commit
271aedc7f4
@ -23,7 +23,6 @@ from calibre.ebooks.chardet import xml_to_unicode
|
||||
from calibre.library.comments import sanitize_comments_html
|
||||
|
||||
ovrdrv_data_cache = {}
|
||||
cover_url_cache = {}
|
||||
cache_lock = RLock()
|
||||
base_url = 'http://search.overdrive.com/'
|
||||
|
||||
@ -96,8 +95,10 @@ class OverDrive(Source):
|
||||
|
||||
ovrdrv_id = identifiers.get('overdrive', None)
|
||||
br = self.browser
|
||||
referer = self.get_base_referer()+'ContentDetails-Cover.htm?ID='+ovrdrv_id
|
||||
req = mechanize.Request(cached_url)
|
||||
if ovrdrv_id is not None:
|
||||
referer = self.get_base_referer()+'ContentDetails-Cover.htm?ID='+ovrdrv_id
|
||||
req.add_header('referer', referer)
|
||||
req.add_header('referer', referer)
|
||||
log('Downloading cover from:', cached_url)
|
||||
try:
|
||||
@ -240,7 +241,7 @@ class OverDrive(Source):
|
||||
else:
|
||||
creators = creators.split(', ')
|
||||
# if an exact match in a preferred format occurs
|
||||
if (author and creators[0] == author[0]) and od_title == title and int(formatid) in [1, 50, 410, 900]:
|
||||
if (author and creators[0] == author[0]) and od_title == title and int(formatid) in [1, 50, 410, 900] and thumbimage:
|
||||
return self.format_results(reserveid, od_title, subtitle, series, publisher,
|
||||
creators, thumbimage, worldcatlink, formatid)
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user