View Single Post
Old 06-22-2017, 03:48 AM   #2259
FaceDeer
Connoisseur
FaceDeer will become famous soon enoughFaceDeer will become famous soon enoughFaceDeer will become famous soon enoughFaceDeer will become famous soon enoughFaceDeer will become famous soon enoughFaceDeer will become famous soon enoughFaceDeer will become famous soon enough
 
Posts: 89
Karma: 706
Join Date: Nov 2012
Device: Kobo Touch
I've figured out what's causing the Fimfiction error. I made a silly oversight in an obscure regex that only gets called as a fallback when Fimfiction fails to generate a full set of data for some reason.

Basically, the adapter tries to read the author's "last logged in" date, which is normally present in the page in a nice Unix-formatted timestamp. But occasionally for reasons I've not been able to determine that timestamp is missing from the page's source. In that case the adapter falls back to trying to parse the human-readable date string instead. I wrote a regex that, among other things, turns the date ordinal "21st", "22nd", "23rd", "24th", etc. into just the number... but I forgot to include the "st" case.

So, sometimes Fimfiction fails to include a Unix timestamp for the "last logged in" date, and when that date happens to be the "1st", "21st" or "31st" of some month the fallback regex fails to parse it.

Obscure edge cases are such fun. I tested on literally thousands of Fimfiction test URLs without encountering this. I guess now that it's the 21st of June it suddenly became more common.

Last edited by FaceDeer; 06-22-2017 at 03:58 AM.
FaceDeer is offline   Reply With Quote