mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-02-24 17:45:20 +01:00
...
This commit is contained in:
parent
c434c5cf50
commit
a3ee07a2da
1 changed files with 2 additions and 2 deletions
|
|
@ -460,14 +460,14 @@ def parse_cover(self, root, raw=b""):
|
|||
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…
Reference in a new issue