Get Books: Fix incorrect price retrieval from ebooks.com. Fixes #1055785 (Price of book search always incorrect)

This commit is contained in:
Kovid Goyal 2012-09-26 13:04:09 +05:30
parent 075fbec828
commit adcdc5be26

View File

@ -97,7 +97,7 @@ class EbookscomStore(BasicStoreConfig, StorePlugin):
with closing(br.open(url + id, timeout=timeout)) as nf: with closing(br.open(url + id, timeout=timeout)) as nf:
pdoc = html.fromstring(nf.read()) pdoc = html.fromstring(nf.read())
price_l = pdoc.xpath('//span[@class="price"]/text()') price_l = pdoc.xpath('//div[@class="book-info"]/div[@class="price"]/text()')
if price_l: if price_l:
price = price_l[0] price = price_l[0]
search_result.price = price.strip() search_result.price = price.strip()