This program scrapes writing.com interactive stories. You can:
- Save stories to a local database
- Read them in your browser
You need a paid (basic or above) writing.com account to use this. It cannot handle the "Interactive Stories are Temporarily Unavailable" error page.
To run this program, you need Docker and Sqlite3.
In src/main/resources/applicaton.conf
, you will need to change:
my_session
anduser_ntoken
: These are your writing.com cookies.- If writing.com logs you out, you will need to log in again and update
application.conf
with your new cookies
- If writing.com logs you out, you will need to log in again and update
use_config_stories
: this must be eithertrue
orfalse
false
: save interactive stories you have favorited. These appear here:writing.com/main/my_favorites
true
: only save the stories instories
. See the instructions inapplication.conf
This will save stories to a local Sqlite database. This is just a file on your computer. You will need to create it by following these steps:
# Create an empty file
touch wcomdownloader.db
# Run the migrations (assumes you are in in the base directory of this repo)
sqlite3 wcomdownloader.db < db/migration.sql
Just run:
docker-compose build
Re-run this every time the code updates, or if you update the configuration file.
This will scrape writing.com for stories and save them to your local database.
Run the docker-compose service scrape
, supplying the path to the database you created earlier as an environment variable:
DB=/path/to/wcomdownloader.db docker-compose run scrape
This will render your stories into HTML that you can read in your browser. Start at outline.html
.
Note that this is a very basic generator. It writes semantic HTML with no CSS styling.
Run the docker-compose service render
, supplying the path to your database and the directory in which stories will be written.
Supply the same directory over multiple runs: if new chapters are saved, the renderer will add them to the existing story and re-render preceding chapters so that the links work.
DB=/path/to/wcomdownloader.db RENDER=/path/to/directory/ docker-compose run render