mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
ebookpoint plugin: fix cover fetching
This commit is contained in:
parent
7c5ab5bc17
commit
d8c44b22c3
@ -1,10 +1,10 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from __future__ import (unicode_literals, division, absolute_import, print_function)
|
from __future__ import (unicode_literals, division, absolute_import, print_function)
|
||||||
store_version = 5 # Needed for dynamic plugin loading
|
store_version = 6 # Needed for dynamic plugin loading
|
||||||
|
|
||||||
__license__ = 'GPL 3'
|
__license__ = 'GPL 3'
|
||||||
__copyright__ = '2011-2013, Tomasz Długosz <tomek3d@gmail.com>'
|
__copyright__ = '2011-2016, Tomasz Długosz <tomek3d@gmail.com>'
|
||||||
__docformat__ = 'restructuredtext en'
|
__docformat__ = 'restructuredtext en'
|
||||||
|
|
||||||
import re
|
import re
|
||||||
@ -63,7 +63,7 @@ class EbookpointStore(BasicStoreConfig, StorePlugin):
|
|||||||
formats = ', '.join(data.xpath('.//div[@class="ikony"]/span/text()'))
|
formats = ', '.join(data.xpath('.//div[@class="ikony"]/span/text()'))
|
||||||
if formats in ['MP3','']:
|
if formats in ['MP3','']:
|
||||||
continue
|
continue
|
||||||
cover_url = ''.join(data.xpath('.//a[@class="cover"]/img/@src'))
|
cover_url = ''.join(data.xpath('.//a[@class="cover"]/img/@data-src'))
|
||||||
title = ''.join(data.xpath('.//h3/a/@title'))
|
title = ''.join(data.xpath('.//h3/a/@title'))
|
||||||
title = re.sub('eBook.', '', title)
|
title = re.sub('eBook.', '', title)
|
||||||
author = ''.join(data.xpath('.//p[@class="author"]//text()'))
|
author = ''.join(data.xpath('.//p[@class="author"]//text()'))
|
||||||
@ -73,7 +73,7 @@ class EbookpointStore(BasicStoreConfig, StorePlugin):
|
|||||||
counter -= 1
|
counter -= 1
|
||||||
|
|
||||||
s = SearchResult()
|
s = SearchResult()
|
||||||
s.cover_url = 'http://ebookpoint.pl' + re.sub('72x9', '65x8',cover_url)
|
s.cover_url = re.sub('72x9', '65x8',cover_url)
|
||||||
s.title = title.strip()
|
s.title = title.strip()
|
||||||
s.author = author.strip()
|
s.author = author.strip()
|
||||||
s.price = re.sub(r'\.',',',price)
|
s.price = re.sub(r'\.',',',price)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user