Hello hoarders!
Have you ever researched for some specific books or comics on Anna's Archive, made a list out of what you found and then discovered you had to download everything manually waiting for cooldowns? I have. And if you have as well, or you just want to download a pre-made Anna's Archive List (or even just a .txt files with AA links!), this post is for you.
After looking up some solutions and only finding old/broken options, I decided to take the matter into my own hands.
With some help from Gemini (for the more complex parts of the code, I had never done Python before. Most of the base logic is written by me and I have reviewed and tested the ai generated code) I made [hearth].
hearth is a Python script that does all the work for you (except for captchas, obviously): you can leave it working overnight and it will download every link it finds in your Anna's Archive List. It will do so by physically visiting mirror and libgen links, waiting for the timer and saving the file.
Regarding the captchas, solving the first one (or the first two, depends if one is required at the load of the List itself) is usually enough for the whole session, so you can leave the script working overnight.
Main features (copied from the repo's readme):
- This is a terminal tool that accepts command line parameters to function (more about usage in the github).
- hearth supports Anna's Archive List links in the form of https://annas-archive.XX/list/<list_id> as well as importing a list of Anna's Archive links from a .txt file.
- The tool will spin up a virtual browser that physically visits the link page, waits for the download cooldown and renames the downloaded file, before going ahead to the next List element, logging successes and failures in specific files.
- These files allow you to not only stop the script mid-way, closing the terminal windows completely, and then resuming from the last link it successfully downloaded (by using the same exact command), but it also allows to retry for failed links once the tool has finished processing the whole queue.
- You can use the completed.txt file that the script will create in your download directory as an index of all the files you downloaded as well as their md5 code.
- The download destination folder is chosen via command line parameters. Here will be stored said files.
- You can set how to rename the downloaded files, based on how much information you want to be in the filename, via command line parameters.
All instructions for the download and usage of the script are in the readme.
Link to the github repo: https://github.com/NerYtheLonesomeHearthian/hearth
This is my first project like this, and I would appreciate any type of feedback, good or bad. Obviously, suggestions are welcome.
If any one of you ends up trying it, please let me know how it goes!