View Single Post
Old 09-15-2016, 05:04 PM   #57
oren64
I need a chapter break
oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.
 
oren64's Avatar
 
Posts: 4,042
Karma: 56058267
Join Date: Mar 2015
Location: Israel
Device: Kobo Glo
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.

Spoiler:
Code:
    def parse_rating(self, root):
        rating_node = root.xpath('//div[@id="metacol"]/div[@id="bookMeta"]/span[@class="value rating"]/span')
        if rating_node:
            rating_text = tostring(rating_node[0], method='text', encoding=unicode)
            rating_text = re.sub('[^0-9]', '', rating_text)
            rating_value = float(rating_text)
	    if 5 < rating_value < 100:
                return rating_value / 10
            if rating_value >= 100:
                return rating_value / 100
            return rating_value

Now it works okay.

Last edited by oren64; 09-17-2016 at 07:11 AM.
oren64 is offline   Reply With Quote