mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update Amazon metadata download plugin for changes to amazon results page markup
This commit is contained in:
parent
30d0b71027
commit
293571cb8a
@ -842,7 +842,7 @@ class Worker(Thread): # Get details {{{
|
||||
class Amazon(Source):
|
||||
|
||||
name = 'Amazon.com'
|
||||
version = (1, 2, 5)
|
||||
version = (1, 2, 6)
|
||||
minimum_calibre_version = (2, 82, 0)
|
||||
description = _('Downloads metadata and covers from Amazon')
|
||||
|
||||
@ -1157,7 +1157,10 @@ class Amazon(Source):
|
||||
return False
|
||||
return True
|
||||
|
||||
for a in root.xpath(r'//li[starts-with(@id, "result_")]//a[@href and contains(@class, "s-access-detail-page")]'):
|
||||
result_links = root.xpath('//div[contains(@class, "s-result-list")]//div[@data-index]//h5//a[@href]')
|
||||
if not result_links:
|
||||
result_links = root.xpath(r'//li[starts-with(@id, "result_")]//a[@href and contains(@class, "s-access-detail-page")]')
|
||||
for a in result_links:
|
||||
title = tostring(a, method='text', encoding=unicode)
|
||||
if title_ok(title):
|
||||
url = a.get('href')
|
||||
|
Loading…
x
Reference in New Issue
Block a user