Some changes to the amazon.de site markup

This commit is contained in:
Kovid Goyal 2023-05-28 15:42:51 +05:30
parent 71547e8a11
commit 9ec1f0820a
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -584,6 +584,9 @@ class Worker(Thread): # Get details {{{
span = root.xpath('//*[@id="ebooksTitle"]') span = root.xpath('//*[@id="ebooksTitle"]')
if span: if span:
return sanitize_title(self.totext(span[0])) 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') raise ValueError('No title block found')
tdiv = tdiv[0] tdiv = tdiv[0]
actual_title = tdiv.xpath('descendant::*[@id="btAsinTitle"]') actual_title = tdiv.xpath('descendant::*[@id="btAsinTitle"]')
@ -602,6 +605,7 @@ class Worker(Thread): # Get details {{{
'#bylineInfo .author .contributorNameID', '#bylineInfo .author .contributorNameID',
'#bylineInfo .author a.a-link-normal', '#bylineInfo .author a.a-link-normal',
'#bylineInfo #bylineContributor', '#bylineInfo #bylineContributor',
'#bylineInfo #contributorLink',
): ):
matches = tuple(self.selector(sel)) matches = tuple(self.selector(sel))
if matches: if matches:
@ -1038,7 +1042,7 @@ class Worker(Thread): # Get details {{{
class Amazon(Source): class Amazon(Source):
name = 'Amazon.com' name = 'Amazon.com'
version = (1, 3, 3) version = (1, 3, 4)
minimum_calibre_version = (2, 82, 0) minimum_calibre_version = (2, 82, 0)
description = _('Downloads metadata and covers from Amazon') description = _('Downloads metadata and covers from Amazon')