mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
Amazon metadata plugin: Update for changed markup for some books on amazon search results page. Fixes #2091542 [Error in Amazon ebook metadata download](https://bugs.launchpad.net/calibre/+bug/2091542)
This commit is contained in:
parent
8ef7adc954
commit
1cd6aaef70
@ -1090,7 +1090,7 @@ class Worker(Thread): # Get details {{{
|
|||||||
class Amazon(Source):
|
class Amazon(Source):
|
||||||
|
|
||||||
name = 'Amazon.com'
|
name = 'Amazon.com'
|
||||||
version = (1, 3, 10)
|
version = (1, 3, 11)
|
||||||
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')
|
||||||
|
|
||||||
@ -1446,6 +1446,7 @@ class Amazon(Source):
|
|||||||
'//div[contains(@class, "s-result-list")]//h2/a[@href]',
|
'//div[contains(@class, "s-result-list")]//h2/a[@href]',
|
||||||
'//div[contains(@class, "s-result-list")]//div[@data-index]//h5//a[@href]',
|
'//div[contains(@class, "s-result-list")]//div[@data-index]//h5//a[@href]',
|
||||||
r'//li[starts-with(@id, "result_")]//a[@href and contains(@class, "s-access-detail-page")]',
|
r'//li[starts-with(@id, "result_")]//a[@href and contains(@class, "s-access-detail-page")]',
|
||||||
|
'//div[@data-cy="title-recipe"]/a[@href]',
|
||||||
):
|
):
|
||||||
result_links = root.xpath(query)
|
result_links = root.xpath(query)
|
||||||
if result_links:
|
if result_links:
|
||||||
@ -1812,6 +1813,11 @@ def manual_tests(domain, **kw): # {{{
|
|||||||
]
|
]
|
||||||
),
|
),
|
||||||
|
|
||||||
|
( # New search results page markup (Dec 2024)
|
||||||
|
{'title': 'Come si scrive un articolo medico-scientifico'},
|
||||||
|
[title_test('Come si scrive un articolo medico-scientifico', exact=True)]
|
||||||
|
),
|
||||||
|
|
||||||
( # No specific problems
|
( # No specific problems
|
||||||
{'identifiers': {'isbn': '0743273567'}},
|
{'identifiers': {'isbn': '0743273567'}},
|
||||||
[title_test('the great gatsby'),
|
[title_test('the great gatsby'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user