View Single Post
Old 02-14-2025, 08:10 PM   #10345
bpothier
Member
bpothier began at the beginning.
 
Posts: 20
Karma: 10
Join Date: May 2020
Device: Kobo
SOL bug when title contains the word "author"

Not sure if this may apply to other adapters, but found the bug I mentioned a few posts back (using current test version in CLI mode makes adding numerous debug calls a bit easier)

Simple version: Stories that contain the word "author" in the Title break the "authfrom" code.

(This is relative to: adapter_storiesonlinenet.py around line 216)
Specifically, when the check of div "top-header" finds the word "author":

"if authfrom is None or 'author' not in str(authfrom)"

(actually from story title) it uses that for processing the "authfrom" to set "autorID", "authorUrl", etc... When in fact, those values do not exist in the "top-header" so later on when findStoryRow loops the authorUrl[0].. it is blank... and fails with "list index out of range".

Testing by forcing it to use the soup.find on 'footer' instead, will correctly process and set values.

I looked back and the other story that failed (that I had not dived into issue on) also contained the word "author" in title..

SFW test story: SOL /s/56768 "the-author"

Last edited by bpothier; 02-14-2025 at 08:50 PM. Reason: (added SFW story url)
bpothier is offline   Reply With Quote