diff --git a/src/calibre/ebooks/metadata/sources/amazon.py b/src/calibre/ebooks/metadata/sources/amazon.py index f1f3444827..70f70b1052 100644 --- a/src/calibre/ebooks/metadata/sources/amazon.py +++ b/src/calibre/ebooks/metadata/sources/amazon.py @@ -842,7 +842,7 @@ class Worker(Thread): # Get details {{{ class Amazon(Source): name = 'Amazon.com' - version = (1, 2, 5) + version = (1, 2, 6) minimum_calibre_version = (2, 82, 0) description = _('Downloads metadata and covers from Amazon') @@ -1157,7 +1157,10 @@ class Amazon(Source): return False return True - for a in root.xpath(r'//li[starts-with(@id, "result_")]//a[@href and contains(@class, "s-access-detail-page")]'): + result_links = root.xpath('//div[contains(@class, "s-result-list")]//div[@data-index]//h5//a[@href]') + if not result_links: + result_links = root.xpath(r'//li[starts-with(@id, "result_")]//a[@href and contains(@class, "s-access-detail-page")]') + for a in result_links: title = tostring(a, method='text', encoding=unicode) if title_ok(title): url = a.get('href')