mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update amazon metadata plugin for a website change
This commit is contained in:
parent
43f8824acd
commit
a31c5b90ae
@ -486,12 +486,16 @@ class Worker(Thread): # Get details {{{
|
|||||||
return ans
|
return ans
|
||||||
|
|
||||||
def parse_authors(self, root):
|
def parse_authors(self, root):
|
||||||
matches = tuple(self.selector('#byline .author .contributorNameID'))
|
for sel in (
|
||||||
if not matches:
|
'#byline .author .contributorNameID',
|
||||||
matches = tuple(self.selector('#byline .author a.a-link-normal'))
|
'#byline .author a.a-link-normal',
|
||||||
if matches:
|
'#bylineInfo .author .contributorNameID',
|
||||||
authors = [self.totext(x) for x in matches]
|
'#bylineInfo .author a.a-link-normal'
|
||||||
return [a for a in authors if a]
|
):
|
||||||
|
matches = tuple(self.selector(sel))
|
||||||
|
if matches:
|
||||||
|
authors = [self.totext(x) for x in matches]
|
||||||
|
return [a for a in authors if a]
|
||||||
|
|
||||||
x = '//h1[contains(@class, "parseasinTitle")]/following-sibling::span/*[(name()="a" and @href) or (name()="span" and @class="contributorNameTrigger")]'
|
x = '//h1[contains(@class, "parseasinTitle")]/following-sibling::span/*[(name()="a" and @href) or (name()="span" and @class="contributorNameTrigger")]'
|
||||||
aname = root.xpath(x)
|
aname = root.xpath(x)
|
||||||
@ -835,7 +839,7 @@ class Worker(Thread): # Get details {{{
|
|||||||
class Amazon(Source):
|
class Amazon(Source):
|
||||||
|
|
||||||
name = 'Amazon.com'
|
name = 'Amazon.com'
|
||||||
version = (1, 2, 0)
|
version = (1, 2, 1)
|
||||||
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')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user