Skip to content
This repository has been archived by the owner on Jun 30, 2019. It is now read-only.

SolRacht/writing.com-archival

Repository files navigation

writing.com-archival

This is a Python3 utility for archiving interactive stories from writing.com.

Archiving a story will download every chapter from that story into ./archive/<story_id>/ as a set of browsable html files which you can open in your browser. Updating a story downloads any new chapters into the archive.

Command line usage:

$ cd <path-to-source> 
$ chmod +x run.py                          # If the following commands do not work
$ ./run.py get <id1> <id2>...              # Downloads or updates interactives with item_ids <id1>, <id2>...
$ ./run.py get_search "<url1>" "<url2>"... # Downloads every interactive in these search results. See note below.
$ ./run.py update                          # Update existing archives

CAVEAT EMPTOR - BUYER BEWARE

I am no longer actively maintaining this repository. You should be prepared to fix the code if you really want to get it to work. I think it actually broke a while ago when the HTML layout of the chapter pages changed a bit. So if you're not a programmer or at least familiar with running Python programs, turn back now. Feel free to fork the repository though.

Also, I've only used this on Linux. It probably works on Mac, but I doubt it will work out of the box on Windows.

Item_id?

The item_id for a story is in its url: http://www.writing.com/main/interact/item_id/$(THIS_IS_THE_ITEM_ID)/map/14411122

get_search

To get the proper URL, first perform a search on writing.com. Then click the magnifying glass icon just above the results to redo the search. Now your URL is in the correct form for get_search. Don't forget to quote it with "".

Your first use

You will be asked to enter your login credentials to writing.com on your first use. This is because writing.com requires a logged-in session to access interactive chapters. This won't save your password, but session cookies will be saved in a file called session.

Dependencies

Python3 and the packages mechanicalsoup, jinja2, and lxml. You will need to pip install them.

Troubleshooting

You may encounter errors while trying to download stories. If the error does not crash the utility, I suggest trying to download it again, as some of the errors are transient. But let me know what story/chapter you had trouble with and I'll see what I can do.

If the error does crash the utility, I suggest logging in again. Best case scenario either your login was unsuccesful or writing.com has decided to stop serving your session. Delete session (not session.py!) and you'll be asked for your credentials again. Note that it won't tell you if the login was successful or not. If it still fails, let me know.

About

Utility for downloading Interactives from Writing.com (Deprecated: see https://github.com/SolRacht/WritingComDownloader)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published