mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
...
This commit is contained in:
parent
c434c5cf50
commit
a3ee07a2da
@ -460,14 +460,14 @@ class Worker(Thread): # Get details {{{
|
||||
js_img = re.search(br'"largeImage":"(http://[^"]+)",',raw)
|
||||
if js_img:
|
||||
src = js_img.group(1).decode('utf-8')
|
||||
if ('/no-image-avail' not in src and 'loading-' not in src):
|
||||
if ('/no-image-avail' not in src and 'loading-' not in src and '/no-img-sm' not in src):
|
||||
self.log('Found image: %s' % src)
|
||||
parts = src.split('/')
|
||||
if len(parts) > 3:
|
||||
bn = parts[-1]
|
||||
sparts = bn.split('_')
|
||||
if len(sparts) > 2:
|
||||
bn = sparts[0] + sparts[-1]
|
||||
bn = re.sub(r'\.\.jpg$', '.jpg', (sparts[0] + sparts[-1]))
|
||||
return ('/'.join(parts[:-1]))+'/'+bn
|
||||
|
||||
def parse_isbn(self, pd):
|
||||
|
Loading…
x
Reference in New Issue
Block a user