mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
improve format detection for Gandalf store
This commit is contained in:
parent
e582da8207
commit
c9800add54
@ -56,8 +56,8 @@ class GandalfStore(BasicStoreConfig, StorePlugin):
|
|||||||
|
|
||||||
cover_url = ''.join(data.xpath('.//img/@src'))
|
cover_url = ''.join(data.xpath('.//img/@src'))
|
||||||
title = ''.join(data.xpath('.//div[@class="info"]/h3/a/@title'))
|
title = ''.join(data.xpath('.//div[@class="info"]/h3/a/@title'))
|
||||||
formats = title.split()
|
formats = ''.join(data.xpath('.//div[@class="info"]/p[1]/text()'))
|
||||||
formats = formats[-1]
|
formats = re.findall(r'\((.*?)\)',formats)[0]
|
||||||
author = ''.join(data.xpath('.//div[@class="info"]/h4/text() | .//div[@class="info"]/h4/span/text()'))
|
author = ''.join(data.xpath('.//div[@class="info"]/h4/text() | .//div[@class="info"]/h4/span/text()'))
|
||||||
price = ''.join(data.xpath('.//h3[@class="promocja"]/text()'))
|
price = ''.join(data.xpath('.//h3[@class="promocja"]/text()'))
|
||||||
price = re.sub('PLN', 'zł', price)
|
price = re.sub('PLN', 'zł', price)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user