Back to directory
Aivean avatar

royalroad-downloader

https://royalroad.com book downloader. Read more below about its uses, features, and usage.

Clone repository

git clone https://github.com/Aivean/royalroad-downloader.git

74

Stars

6

Forks

5

Watchers

MIT

License

Royal Road book downloader

A simple command line tool that downloads fiction from Royal Road as html. Use Calibre to convert html to any desired format.

test Github All Releases GitHub last commit License: MIT

Features

  • Downloads complete fiction or specific chapter range from Royal Road as HTML
  • Preserves chapter structure and formatting
  • Removes content warnings automatically (--remove-warnings option)
  • Embeds images with --e option
  • Generates clean HTML output ready for conversion to e-book formats

How to use

  • download the latest release .jar
  • install the latest java (maybe you have one, check by executing java -version)
  • execute java -jar royalroad-downloader-assembly-VERSION.jar https://royalroadl.com/fiction/... (replace royalroad fiction URL with your link and VERSION with the corresponding number)
  • the output html file will be created in the current directory

Run java -jar royalroad-downloader-assembly-VERSION.jar --help to see the full usage reference.

Troubleshooting

It may happen that RoyalRoad changes its HTML format and this parser is no longer working. In that case, please create an issue. You may also try to work around the problem by overriding CSS selectors that are used to fetch chapter title and body by supplying -t and -b program arguments.

Default css selectors are:

  • title for the title
  • div.chapter-content for the chapter body

Run the program with --help argument to see the usage reference.

Building from sources

  • run sbt/sbt assembly in the project directory

Note: build tested to work only with Java 8 (will probably fail on other versions).

Running from sources

  • run sbt/sbt --error 'run <arguments>' in project directory, i.e.:

      sbt/sbt --error 'run --help'
    

Credits

Releases

Apr 19, 2025

v2.11.0 - Redesigned and improved warning removal

Download .zip

Completely redesigned warning removal, now relies on injected styles with display:none. Seems to be much more accurate and hopefully would need less maintenance in the future. see #45

Aug 1, 2024

v2.10.2 - fix #37 by adding more keywords for the warnings

Download .zip

Apr 22, 2024

v2.10.1 - fix imgur image embedding and content warning removal

Download .zip

fixed #36: imgur image embedding now working more robust content warning removal

Jan 20, 2024

v2.10.0 - Optional title page

Download .zip

Implemented #30 — added option --include-title-page that does just what the name says.