From 6a3ad1d22f8a214f8f83e12bf3fd7e60bb9a500f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20D=C5=82ugosz?= Date: Sat, 27 Aug 2011 22:44:44 +0200 Subject: [PATCH] improved HTML parsing --- src/calibre/gui2/store/stores/rw2010_plugin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/gui2/store/stores/rw2010_plugin.py b/src/calibre/gui2/store/stores/rw2010_plugin.py index 4726b2b980..ed4d5a53f7 100644 --- a/src/calibre/gui2/store/stores/rw2010_plugin.py +++ b/src/calibre/gui2/store/stores/rw2010_plugin.py @@ -56,11 +56,11 @@ class RW2010Store(BasicStoreConfig, StorePlugin): with closing(br.open(id.strip(), timeout=timeout/4)) as nf: idata = html.fromstring(nf.read()) - cover_url = ''.join(idata.xpath('//div[@class="boxa"]/div[1]/img/@src')) - author = ''.join(idata.xpath('//div[@class="boxb"]/h3[3]/span/text()')) + cover_url = ''.join(idata.xpath('//div[@class="boxa"]//div[@class="img"]/img/@src')) + author = ''.join(idata.xpath('//div[@class="boxb"]//h3[text()="Autor: "]/span/text()')) title = ''.join(idata.xpath('//div[@class="boxb"]/h2[1]/text()')) title = re.sub(r'\(#.+\)', '', title) - formats = ''.join(idata.xpath('//div[@class="boxb"]/h3[6]/span/text()')) + formats = ''.join(idata.xpath('//div[@class="boxb"]//h3[text()="Format pliku: "]/span/text()')) price = ''.join(idata.xpath('//div[@class="price-box"]/span/text()')) + ',00 zł' counter -= 1