[CLI] Error with Literotica... if rating is not a number, it breaks

14 views
Skip to first unread message

Gwydion Comyn

unread,
Apr 13, 2016, 10:34:36 PM4/13/16
to FanFicFare (was FanFictionDownLoader)
Well... I was trying to save the following story, and it breaks... *sigh*... the story is

https://www.literotica.com/s/side-bet-bluff-ch-01

since the ratings for that story is x.xx, it breaks on line 202 in the adapter... I added the following lines, but it is a stopgap for this file... I'm not sure if there are any other ratings that are not numbers...

                if numrating == "x.xx":
                    numrating = 0

I added them at lines 204, just before it calls the float()... it worked, but I'm sure there is a better solution (probably) Probably a check for numeric, but I didn't want to add a whole function to the class, and it could probably be put in one of the base codes to be used by all following adapters.

GComyn

Jim Miller

unread,
Apr 14, 2016, 11:25:59 AM4/14/16
to fanfic-d...@googlegroups.com

So I assume the storiesonline.net changes all worked then?

There are already some fixes for literotica.com checked in for the
rating issue.

However, that particular story still errors due to a unicode character
not converting to ascii. I've pushed a fix for that too:

https://raw.githubusercontent.com/JimmXinu/FanFicFare/master/fanficfare/adapters/adapter_literotica.py

Jim
Reply all
Reply to author
Forward
0 new messages