From 9ec1f0820a639312833a2d5a011aca5714fc964a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 28 May 2023 15:42:51 +0530 Subject: [PATCH] Some changes to the amazon.de site markup --- src/calibre/ebooks/metadata/sources/amazon.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/calibre/ebooks/metadata/sources/amazon.py b/src/calibre/ebooks/metadata/sources/amazon.py index 78a268d784..5f11dab781 100644 --- a/src/calibre/ebooks/metadata/sources/amazon.py +++ b/src/calibre/ebooks/metadata/sources/amazon.py @@ -584,6 +584,9 @@ class Worker(Thread): # Get details {{{ span = root.xpath('//*[@id="ebooksTitle"]') if span: return sanitize_title(self.totext(span[0])) + h1 = root.xpath('//h1[@data-feature-name="title"]') + if h1: + return sanitize_title(self.totext(h1[0])) raise ValueError('No title block found') tdiv = tdiv[0] actual_title = tdiv.xpath('descendant::*[@id="btAsinTitle"]') @@ -602,6 +605,7 @@ class Worker(Thread): # Get details {{{ '#bylineInfo .author .contributorNameID', '#bylineInfo .author a.a-link-normal', '#bylineInfo #bylineContributor', + '#bylineInfo #contributorLink', ): matches = tuple(self.selector(sel)) if matches: @@ -1038,7 +1042,7 @@ class Worker(Thread): # Get details {{{ class Amazon(Source): name = 'Amazon.com' - version = (1, 3, 3) + version = (1, 3, 4) minimum_calibre_version = (2, 82, 0) description = _('Downloads metadata and covers from Amazon')