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:
Kovid Goyal 2015-11-05 11:32:17 +05:30
parent efad4902e3
commit 8832143e14

View File

@ -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")]')