mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -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):
|
||||
|
||||
name = 'Amazon.com'
|
||||
version = (1, 3, 10)
|
||||
version = (1, 3, 11)
|
||||
minimum_calibre_version = (2, 82, 0)
|
||||
description = _('Downloads metadata and covers from Amazon')
|
||||
|
||||
@ -1443,9 +1443,10 @@ class Amazon(Source):
|
||||
return True
|
||||
|
||||
for query in (
|
||||
'//div[contains(@class, "s-result-list")]//h2/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")]',
|
||||
'//div[contains(@class, "s-result-list")]//h2/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")]',
|
||||
'//div[@data-cy="title-recipe"]/a[@href]',
|
||||
):
|
||||
result_links = root.xpath(query)
|
||||
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
|
||||
{'identifiers': {'isbn': '0743273567'}},
|
||||
[title_test('the great gatsby'),
|
||||
|
Loading…
x
Reference in New Issue
Block a user