From 7916569e0430bc01595a9fedfb83e48c79a77007 Mon Sep 17 00:00:00 2001 From: John Schember Date: Fri, 2 Nov 2012 22:30:31 -0400 Subject: [PATCH] Store: Fix Google plugin. --- src/calibre/gui2/store/stores/google_books_plugin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/gui2/store/stores/google_books_plugin.py b/src/calibre/gui2/store/stores/google_books_plugin.py index 60b78e3f7d..63fc3ef942 100644 --- a/src/calibre/gui2/store/stores/google_books_plugin.py +++ b/src/calibre/gui2/store/stores/google_books_plugin.py @@ -68,10 +68,10 @@ class GoogleBooksStore(BasicStoreConfig, StorePlugin): continue title = ''.join(data.xpath('.//h3/a//text()')) - authors = data.xpath('.//span[@class="f"]//a//text()') - if authors and authors[-1].strip().lower() in ('preview', 'read'): + authors = data.xpath('.//div[@class="f"]//a//text()') + while authors and authors[-1].strip().lower() in ('preview', 'read', 'more editions'): authors = authors[:-1] - else: + if not authors: continue author = ', '.join(authors)