JimmXinu / FanFicFare

FanFicFare is a tool for making eBooks from stories on fanfiction and other web sites.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

deviantart.com probably needs force login option

lord-binder opened this issue · comments

Stories marked with the Watchers-Only flag are downloaded almost empty, leaving only the footer from the author and the title.

In addition to the need to log in to access sensitive content, this site has non-obvious reasons for being logged in.
For some works, the main body is closed until you subscribe to the author, which does not require you to directly log in to the site, however, without doing this, you will not be able to subscribe to the author.

I’ll say right away that ordinary stories closed as sensitive content are downloaded normally, which means my login and password are correct.

Can you provide some example story URLs?

I admit, there are not many such deviations, and I downloaded the one I needed manually and lost the link, however, here is an example of a picture with a similar flag, the essence is the same
https://www.deviantart.com/heavnsent/art/watchers-only-psd-16-993358966

Your suggested solution (add always_login option for deviantart) it's the best solution for this 'story'. It's better addressed by automatically doing login when it's a 'Watchers-Only Deviation'.

Adding always_login option isn't difficult, but I hesitate to make code changes without test cases to make sure it addresses the issue at hand.

Yeah, as i see it will solve the problem.

Moreover, the handler for this flag is already present in the code, but does absolutely nothing.
Apparently this block is not needed with the current changes.

    if self.isWatchersOnly(data):
                raise exceptions.FailedToDownload(
                    'Deviation is only available for watchers.' +
                    'You must watch this author before you can download it.'
                )

For now I just added your solution to my copy of the plugin myself, when it becomes possible to try it I will let you know.

It is really difficult to find such cases when you are looking specifically, however, I found one such author, with a closed collection.
What’s strange is that on the first try, everything worked, the stories were downloaded. However, the second attempt ended in failure.
Moreover, I deleted some of the first, successful downloads and tried to download again and they also began to download empty.

And here is a link to one of the stories in this collection, because if you don’t subscribe to the author, even the collection itself will be empty.

Okay, thanks.

From what I see, the adapter noticing and asking for login when it needs is still the better answer for story download. I've pushed some more changes that streamline that some more so it shouldn't login more than once when doing multiple stories.

I've posted test versions in the usual places.

Okey, let's say, that problem fixed for now.