From 9dbeb3c877f7477116d9cbc1de46edd3c7d0ec42 Mon Sep 17 00:00:00 2001 From: John Schember Date: Sun, 30 Dec 2012 21:12:32 -0500 Subject: [PATCH] Store: Fix Google Books. --- src/calibre/gui2/store/stores/google_books_plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/store/stores/google_books_plugin.py b/src/calibre/gui2/store/stores/google_books_plugin.py index 63fc3ef942..6ffeab517c 100644 --- a/src/calibre/gui2/store/stores/google_books_plugin.py +++ b/src/calibre/gui2/store/stores/google_books_plugin.py @@ -59,7 +59,7 @@ class GoogleBooksStore(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[@id="rso"]/li'): + for data in doc.xpath('//ol/li'): if counter <= 0: break @@ -68,7 +68,7 @@ class GoogleBooksStore(BasicStoreConfig, StorePlugin): continue title = ''.join(data.xpath('.//h3/a//text()')) - authors = data.xpath('.//div[@class="f"]//a//text()') + authors = data.xpath('.//span[contains(@class, "f")]//a//text()') while authors and authors[-1].strip().lower() in ('preview', 'read', 'more editions'): authors = authors[:-1] if not authors: