mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Amazon metadata download: Fix for website change at amazon.com that prevented ratings from being downloaded. Fixes #1513318 [ratings dont download](https://bugs.launchpad.net/calibre/+bug/1513318)
This commit is contained in:
parent
efad4902e3
commit
8832143e14
@ -453,11 +453,11 @@ class Worker(Thread): # Get details {{{
|
||||
|
||||
def parse_rating(self, root):
|
||||
for x in root.xpath('//div[@id="cpsims-feature" or @id="purchase-sims-feature" or @id="rhf"]'):
|
||||
# Remove the similar books section as it can cause sppurious
|
||||
# Remove the similar books section as it can cause spurious
|
||||
# ratings matches
|
||||
x.getparent().remove(x)
|
||||
|
||||
rating_paths = ('//div[@data-feature-name="averageCustomerReviews"]',
|
||||
rating_paths = ('//div[@data-feature-name="averageCustomerReviews" or @id="averageCustomerReviews"]',
|
||||
'//div[@class="jumpBar"]/descendant::span[contains(@class,"asinReviewsSummary")]',
|
||||
'//div[@class="buying"]/descendant::span[contains(@class,"asinReviewsSummary")]',
|
||||
'//span[@class="crAvgStars"]/descendant::span[contains(@class,"asinReviewsSummary")]')
|
||||
|
Loading…
x
Reference in New Issue
Block a user