Get Books: Update the Project Gutenberg plugin for the changes to the PG site

This commit is contained in:
Kovid Goyal 2012-06-12 09:34:10 +05:30
parent 23e620a0d5
commit 74e0716c27

View File

@ -45,7 +45,7 @@ class GutenbergStore(BasicStoreConfig, StorePlugin):
counter = max_results
with closing(br.open(url, timeout=timeout)) as f:
doc = html.fromstring(f.read())
for data in doc.xpath('//ol[@class="results"]//li[contains(@class, "icon_title") and not(contains(@class, "toplink"))]'):
for data in doc.xpath('//ol[@class="results"]/li[@class="booklink"]'):
if counter <= 0:
break