theslavicbear / Ebook-Publisher

A Python tool for converting online stories into portable formats
MIT License
32 stars 2 forks source link

CHYOA site change issues cause script to not work #88

Closed sammywasi closed 12 months ago

sammywasi commented 1 year ago

In order to still be on Patreon CHYOA started hiding categories that were previously visible to only showing up to logged in members of more than a month. This has the unfortunate side effect of making the python script fail without throwing an error because to the script (and to people not logged into the site); the stories don't exist.

I'm not exactly sure how this can be fixed without either bolting on the ability to add an end users login credentials; or using a common login in the script for downloading.

theslavicbear commented 12 months ago

Any specific stories you can point to to test? After adding in some dummy headers to the requests, I was able to download a mind control categorized story.

theslavicbear commented 12 months ago

I think I see what you mean now. Certain no-no words are just straight-up stripped out of titles and text if you aren't logged in. I think you're right in that the only fix is to include the user login cookie with the request.

image image

image image

theslavicbear commented 12 months ago

cool, I tested sending my session cookie with the request and was able to get the full version of the page. So either the quick fix where the user needs to supply the session cookie text to the script, or I figure out how to get one from the server by sending the login detail.

theslavicbear commented 12 months ago

request to pull latest code on the festure-3.3 branch to check if using the new --usr and ---pswd commands to supply your month old account allows access to the restricted stories.