tiennm99 ad8d2649c1 refactor!: generalise single-novel script into a hako library
The crawler took one hardcoded novel URL, wrote per-chapter text files
into ./data, and fetched serially until the site answered 429.

Rename the module to hako-crawler and split fetching, page parsing and
crawl orchestration into a hako package that takes any novel URL.

The chapter body is no longer served as markup: #chapter-content now
carries a shuffled, XOR-obfuscated payload that the site's own script
expands in the browser, so the previous p[id=<digits>] extractor
returned nothing at all. Decode it, keeping the plain-markup path as a
fallback. The scheme is read from the page and an unrecognised one is a
hard error, because the alternative is exporting a book of mojibake.

Space requests globally instead of per-goroutine, so concurrency no
longer raises the request rate, and retry only what a retry can fix.
Cache raw pages so re-runs cost no requests.

BREAKING CHANGE: module path is now github.com/tiennm99/hako-crawler,
and the novel URL is a required argument rather than a constant.
2026-08-24 20:39:50 +07:00
2025-07-20 18:59:06 +07:00
2024-05-22 21:04:10 +07:00
2025-03-25 19:01:31 +07:00

MTTools

Personal toolbox — small utilities and scripts, each formerly a standalone repository, merged here with full history.

Directory Tool Language
utils/ Utility batch and shell scripts to make life easier (or harder) Batch/Shell
go-util/ Miscellaneous CLI scripts (Gitea org cleanup, etc.), multi-binary cmd/ layout Go
export-chrome-cookies/ Export Google Chrome cookies on Windows Python
miti-scraper/ Configurable single-site web scraper Go
circular-dependency-checker/ Detects cyclic dependencies in Godot projects Python
image-resizer/ Batch image resizer CLI — scales to a percentage, keeps aspect ratio Go
webp-converter/ HTTP microservice converting WebP images to PNG on-the-fly Go

Unmerged Go-rewrite drafts live on feature/export-chrome-cookies-go and feature/circular-dependency-checker-go.

S
Description
Personal toolbox — utility scripts and small CLI tools (shell/batch, Go, Python, Node.js), merged from standalone repos with full history
Readme
16 MiB
0 Stars 1 Watchers 0 Forks
Languages
Go 75%
Python 22.9%
Shell 0.8%
JavaScript 0.7%
Dockerfile 0.4%
Other 0.2%