mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Get books: fix covers for nexto store
This commit is contained in:
parent
a743a062e2
commit
340401a8c8
@ -1,10 +1,10 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||||
|
|
||||||
store_version = 6 # Needed for dynamic plugin loading
|
store_version = 7 # Needed for dynamic plugin loading
|
||||||
|
|
||||||
__license__ = 'GPL 3'
|
__license__ = 'GPL 3'
|
||||||
__copyright__ = '2011-2020, Tomasz Długosz <tomek3d@gmail.com>'
|
__copyright__ = '2011-2023, Tomasz Długosz <tomek3d@gmail.com>'
|
||||||
__docformat__ = 'restructuredtext en'
|
__docformat__ = 'restructuredtext en'
|
||||||
|
|
||||||
import re
|
import re
|
||||||
@ -81,9 +81,9 @@ class NextoStore(BasicStoreConfig, StorePlugin):
|
|||||||
|
|
||||||
price = ''.join(data.xpath('.//strong[@class="nprice"]/text()'))
|
price = ''.join(data.xpath('.//strong[@class="nprice"]/text()'))
|
||||||
|
|
||||||
cover_url = ''.join(data.xpath('.//img[@class="cover"]/@src'))
|
cover_url = ''.join(data.xpath('.//picture[@class="cover"]/img/@data-src'))
|
||||||
cover_url = re.sub(r'%2F', '/', cover_url)
|
cover_url = re.sub(r'%2F', '/', cover_url)
|
||||||
cover_url = re.sub(r'widthMax=120&heightMax=200', 'widthMax=64&heightMax=64', cover_url)
|
cover_url = re.sub(r'widthMax=235&heightMax=335', 'widthMax=64&heightMax=64', cover_url)
|
||||||
title = ''.join(data.xpath('.//a[@class="title"]/text()'))
|
title = ''.join(data.xpath('.//a[@class="title"]/text()'))
|
||||||
title = re.sub(r' – ebook', '', title)
|
title = re.sub(r' – ebook', '', title)
|
||||||
author = ', '.join(data.xpath('.//div[@class="col-7"]//h4//a/text()'))
|
author = ', '.join(data.xpath('.//div[@class="col-7"]//h4//a/text()'))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user