JimmXinu / FanFicFare

FanFicFare is a tool for making eBooks from stories on fanfiction and other web sites.
Other
739 stars 157 forks source link

DeviantArt NSFW literature links fail, cause exception 'NoneType' object has no attribute 'get_text' #947

Closed jherazob closed 1 year ago

jherazob commented 1 year ago

The problem I'm having: Trying to get DeviantArt literature links labeled NSFW either directly or through Anthologies

Error messages and/or full log output: Status: Error Title: Unknown Author: Unknown Comment: 'NoneType' object has no attribute 'get_text' URL: https://www.deviantart.com/travolore/art/Star-Wars-Bare-Squadron-Chapter-1-The-Rescue-732033644 Tried this with a number of literature posts labeled NSFW and with most of them it returned the same thing, the provided URL is one such example of many, if more are needed i can provide them. Works not labeled NSFW seem to work fine.

Software versions: This is with latest Calibre 6.17 and FanFicFare 4.22.1 on Linux Mint 20.3, any required extra information i can provide. Also tried using the browser cache feature, but as documented this login uses HTTP POST so it fails.

My simplest guess is that it needs login credentials somewhere for these cases, doesn't look like there's yet support for this for DeviantArt

JimmXinu commented 1 year ago

I think this is the same problem as #909, just with a new message. I've put up a test version that should fix it.

jherazob commented 1 year ago

Checking the commit, looks like it's missing " in data" at the end of the added line, right?

JimmXinu commented 1 year ago

Yes, thanks for noticing that.

I don't usually push without testing, but I didn't write this adapter and I don't have a deviant art account.

JimmXinu commented 1 year ago

Test versions up.

jherazob commented 1 year ago

Seems OK! Also found yet another string: "This deviation has been labeled as containing themes not suitable for all deviants", example post from the same series: https://www.deviantart.com/travolore/art/Star-Wars-Bare-Squadron-Prologue-Death-729664865

No idea why so many strings for the same thing...

JimmXinu commented 1 year ago

Does it not work? '>Log in to view<' looks for the 'button', not the text.

JimmXinu commented 1 year ago

Looks like it's working to me.

jherazob commented 1 year ago

Thanks!