Quote:
Originally Posted by oren64
Hi Pr.BarnArt
I have a problem when the rating is x.x0, for example 4.10 the rating show 41.0, Calibre 2.67.
EDIT: I find the problem in goodreadsX-2.1.zip, I changed the code in worker.py file.
Now it works okay.
|
A much simpler fix is:
Code:
def parse_rating(self, root):
rating_node = root.xpath('//div[@id="metacol"]/div[@id="bookMeta"]/span[@class="value rating"]/span')
if rating_node:
try:
rating_text = rating_node[0].text
rating_value = float(rating_text)
return rating_value
except:
return None