mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Get Books: Update publio and virtualo store plugins
Merge branch 'master' of https://github.com/t3d/calibre
This commit is contained in:
commit
d7b3be200a
@ -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__ = '2012-2015, Tomasz Długosz <tomek3d@gmail.com>'
|
__copyright__ = '2012-2016, Tomasz Długosz <tomek3d@gmail.com>'
|
||||||
__docformat__ = 'restructuredtext en'
|
__docformat__ = 'restructuredtext en'
|
||||||
|
|
||||||
import urllib
|
import urllib
|
||||||
@ -53,7 +53,7 @@ class PublioStore(BasicStoreConfig, StorePlugin):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
cover_url = ''.join(data.xpath('.//img[@class="product-tile-cover-photo"]/@src'))
|
cover_url = ''.join(data.xpath('.//img[@class="product-tile-cover-photo"]/@src'))
|
||||||
title = ''.join(data.xpath('.//h3[@class="product-tile-title"]/a/text()'))
|
title = ''.join(data.xpath('.//h3[@class="product-tile-title"]/a/span[1]/text()'))
|
||||||
author = ', '.join(data.xpath('.//span[@class="product-tile-author"]/a/text()'))
|
author = ', '.join(data.xpath('.//span[@class="product-tile-author"]/a/text()'))
|
||||||
price = ''.join(data.xpath('.//div[@class="product-tile-price-wrapper "]/a/ins/text()'))
|
price = ''.join(data.xpath('.//div[@class="product-tile-price-wrapper "]/a/ins/text()'))
|
||||||
# formats = ', '.join([x.strip() for x in data.xpath('.//div[@class="formats"]/a/text()')])
|
# formats = ', '.join([x.strip() for x in data.xpath('.//div[@class="formats"]/a/text()')])
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# -*- 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 = 6 # Needed for dynamic plugin loading
|
store_version = 7 # Needed for dynamic plugin loading
|
||||||
|
|
||||||
__license__ = 'GPL 3'
|
__license__ = 'GPL 3'
|
||||||
__copyright__ = '2011-2016, Tomasz Długosz <tomek3d@gmail.com>'
|
__copyright__ = '2011-2016, Tomasz Długosz <tomek3d@gmail.com>'
|
||||||
@ -74,7 +74,7 @@ class VirtualoStore(BasicStoreConfig, StorePlugin):
|
|||||||
s.cover_url = cover_url
|
s.cover_url = cover_url
|
||||||
s.title = title.strip()
|
s.title = title.strip()
|
||||||
s.author = author.strip()
|
s.author = author.strip()
|
||||||
s.price = price.strip()
|
s.price = re.sub('\.',',',price.strip())
|
||||||
s.detail_item = 'http://virtualo.pl' + id.strip().split('http://')[0]
|
s.detail_item = 'http://virtualo.pl' + id.strip().split('http://')[0]
|
||||||
s.formats = ', '.join(formats).upper()
|
s.formats = ', '.join(formats).upper()
|
||||||
s.drm = SearchResult.DRM_UNLOCKED if nodrm else SearchResult.DRM_LOCKED
|
s.drm = SearchResult.DRM_UNLOCKED if nodrm else SearchResult.DRM_LOCKED
|
||||||
|
Loading…
x
Reference in New Issue
Block a user