A tool to download light novels from ln.hako.vn in epub file format for offline reading.
Windows
·
Android
·
Screenshots
·
Script Usage
- Hako is under a DDoS attack (https://docln.net/thao-luan/3437-bi-ddos), downloads will be very unstable.
- It's highly recommended to use 1.1.1.1 Cloudflare WARP when downloading novels for better performance and reliability.
- Table of Contents
- About The Project
- Getting Started
- Screenshots
- Issues
- Contributing
- License
- Contact
- Acknowledgements
A tool to download light novels from ln.hako.vn in epub file format for offline reading.
Notes:
- This tool is a personal standalone project, it does not have any related to ln.hako.vn administrators.
- If possible, please support the original light novel, hako website, and light novel translation authors.
- This tool is for non-commercial purpose only.
- Working with docln.net, ln.hako.vn, and docln.sbs.
- Auto check and switch to working domain.
- Support all kind of novels (Truyện dịch, Sáng tác, AI Dịch).
- Support images.
- Support navigation and table of contents.
- Notes are shown directly in the light novel content.
- Download all/single volume of a light novel.
- Download specific chapters of a light novel.
- Update all/single downloaded light novel.
- Update new volumes.
- Update new chapters.
- Delete downloaded light novels or individual volumes.
- Auto get current downloaded light novel in the directory.
- Auto checking the new tool version.
- Automatic retry on network failures.
- Dual download modes: Fast mode for speed, Slow mode for reliability with Cloudflare protection.
- Android app: the same downloader as an APK, saving into
Downloads/hako2epub.
For normal user, download the execution file below. Run and follow the instructions.
Windows: hako2epub.exe
Android: hako2epub.apk
- python >= 3.9
- ebooklib
- requests
- bs4
- pillow
- tqdm
- questionary
- argparse
- cloudscraper
- playwright
pip install ebooklib requests bs4 pillow argparse tqdm questionary cloudscraper playwright
playwright install chromiumusage: hako2epub.py [-h] [-v] [-m {fast,slow}] [-c ln_url] [-u [ln_url]] [-d]
[-i]
[ln_url]
A tool to download light novels from https://ln.hako.vn in epub file format for offline reading.
positional arguments:
ln_url url to the light novel page
options:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-m, --mode {fast,slow} download mode: fast (faster, may get blocked) or slow (default, more reliable)
-c, --chapter ln_url download specific chapters of a light novel
-u, --update [ln_url] update all/single light novel
-d, --delete delete downloaded light novels or volumes
-i, --interactive run in interactive mode (TUI)
- Slow mode (default): More reliable, handles protected content, uses Cloudflare protection
- Fast mode: Faster downloads with more threads, but may get blocked by Cloudflare
- Download a light novel (slow mode, default)
python hako2epub.py light_novel_url- Download a light novel (fast mode)
python hako2epub.py --mode fast light_novel_url- Download specific chapters of light novel
python hako2epub.py -c light_novel_url- Update all downloaded light novels
python hako2epub.py -u- Update a single downloaded light novel
python hako2epub.py -u light_novel_url- Delete downloaded light novels or volumes
python hako2epub.py -d- Slow mode (default) includes delays to avoid being blocked by Cloudflare.
- Fast mode uses more threads and no delays for faster downloads, but may get blocked.
- Light novel will be downloaded into the same folder as the program.
- Downloaded information will be saved into
ln_info.jsonfile located in the same folder as the program. - If you download specific chapters of a light novel, please enter the full name of the chapter in the "from ... to ..." prompt.
- If you update the volume which contains specific chapters, only new chapters after the current latest chapter will be added.
- Try to keep the program and
ln_info.jsonfile at the same folder with your downloaded light novels for efficiently management. - Deleting asks which light novels first, then which of their volumes to remove. Selecting every volume of a light novel also removes its folder and its
ln_info.jsonentry. - The Android app writes the same
ln_info.jsonformat, but names folders and files differently (Tap-1-Novel.epubhere vsTap 1 - Novel.epubon Android), so a library copied between the two will be re-downloaded rather than recognised.
Windows
Android
- I only tested on some of my favorite light novels.
- Sometimes the tool can not get images from some image hosts.
- Sometimes you have to wait (most cases are under 10 seconds) to download or update the light novels (maybe only the first light novel in the list). If you are over that time, you should use a VPN (1.1.1.1 Cloudflare WARP) to avoid this.
- If you update the light novel that was renamed, it will download the whole light novel again. To avoid this, please manually rename the path of the epub file to the new light novel name exactly like the current name format. Also rename the light novel in the
ln_info.jsonfile.
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See [LICENSE][license-url] for more information.
- Author - @quantrancse


