From 761e2b5c6fedca68b60a06912e582a87cab03fa7 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 18 Oct 2024 13:59:50 +0530 Subject: [PATCH] Amazon metadata download: Switch the default backend to bing Google discontinued its webcache and Wayback machine's webcache is currently broken. And lots of google search result URLs are not indexed in the bing web cache. So search using bing instead. --- src/calibre/ebooks/metadata/sources/amazon.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/calibre/ebooks/metadata/sources/amazon.py b/src/calibre/ebooks/metadata/sources/amazon.py index 032331e46d..026c933ac4 100644 --- a/src/calibre/ebooks/metadata/sources/amazon.py +++ b/src/calibre/ebooks/metadata/sources/amazon.py @@ -1090,7 +1090,7 @@ class Worker(Thread): # Get details {{{ class Amazon(Source): name = 'Amazon.com' - version = (1, 3, 9) + version = (1, 3, 10) minimum_calibre_version = (2, 82, 0) description = _('Downloads metadata and covers from Amazon') @@ -1559,13 +1559,17 @@ class Amazon(Source): domain)[len('https://'):].partition('/')[0] matches = [] server = override_server or self.server - urlproc, sfunc = se.google_url_processor, se.google_search if server == 'bing': urlproc, sfunc = se.bing_url_processor, se.bing_search elif server == 'wayback': urlproc, sfunc = se.wayback_url_processor, se.ddg_search elif server == 'ddg': urlproc, sfunc = se.ddg_url_processor, se.ddg_search + elif server == 'google': + urlproc, sfunc = se.google_url_processor, se.google_search + else: # auto or unknown + # urlproc, sfunc = se.google_url_processor, se.google_search + urlproc, sfunc = se.bing_url_processor, se.bing_search try: results, qurl = sfunc(terms, site, log=log, br=br, timeout=timeout) except HTTPError as err: