From 1f6072c8864cb1b04c8a86513d4f79fdc341b8b7 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 21 Jun 2020 09:54:04 +0530 Subject: [PATCH] Change in google search page markup Fixes #1884400 [Amazon.co.jp metadata won't download](https://bugs.launchpad.net/calibre/+bug/1884400) --- src/calibre/ebooks/metadata/sources/search_engines.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/ebooks/metadata/sources/search_engines.py b/src/calibre/ebooks/metadata/sources/search_engines.py index aba9467c4d..be700cc2d8 100644 --- a/src/calibre/ebooks/metadata/sources/search_engines.py +++ b/src/calibre/ebooks/metadata/sources/search_engines.py @@ -20,7 +20,7 @@ from calibre import browser as _browser, prints, random_user_agent from calibre.utils.monotonic import monotonic from calibre.utils.random_ua import accept_header_for_ua -current_version = (1, 0, 3) +current_version = (1, 0, 4) minimum_calibre_version = (2, 80, 0) @@ -241,7 +241,7 @@ def google_search(terms, site=None, br=None, log=prints, safe_search=False, dump continue title = tostring(a) try: - c = div.xpath('descendant::div[@role="menu"]//a[@class="fl"]')[0] + c = div.xpath('descendant::*[@role="menu"]//a[@class="fl"]')[0] except IndexError: log('Ignoring {!r} as it has no cached page'.format(title)) continue