Downloading books from talebook, www.sanqiu.cc This is totally rewrite fork compare to its original version.
- Go Releaser is used for releasing and local building
- golangci-lint is used for code style.
- goimports-reviser is used for sorting imports.
- Download from previous progress.
- Register account on website.
- Bypass the ratelimit from cloudflare.
- Find all the books update from www.sanqiu.cc.
- Download required formats from 189 cloud drive.
- Record the download progress for crontab jobs.
TODO
Usage:
bookhunter telegram [flags]
Flags:
--appHash string The appHash for telegram.
--appId int The appID for telegram.
-k, --channelId string The channelId for telegram. You must set value. (default "https://t.me/haoshufenxiang")
-d, --download string The book directory you want to use, default would be current working directory. (default "/Users/zhaojianyun/Developer/project/github/bookhunter")
-f, --format strings The file formats you want to download. (default [EPUB,MOBI,PDF])
-h, --help help for telegram
-i, --initial int The book id you want to start download. It should exceed 0. (default 1)
--loadMessageSize int The loadMessageSize is used to set the size of the number of messages obtained by requesting telegram API. 0 < loadMessageSize < 100 (default 20)
-g, --progress string The download progress file name you want to use, it would be saved under the download directory. (default "progress")
--reLogin force re-login.
-n, --rename Rename the book file by book ID.
-r, --retry int The max retry times for timeout download request. (default 5)
-s, --sessionPath string The session file for telegram. (default ".tg-session")
-t, --thread int The number of download threads. (default 1)
-o, --timeout duration The max pending time for download request. (default 10m0s)
Example command :
bookhunter telegram --appId 12345 --appHash xxxxx -k https://t.me/MothLib
How to get appId
and appHash
please refer to Creating your Telegram Application
brew tap bibliolater/tap
brew install bookhunter
scoop bucket add bibliolater https://github.com/bibliolater/scoop-bucket.git
scoop install bibliolater/bookhunter
Download the latest release in release page. Choose related tarball by your running environment.
Execute bookhunter -h
to see how to use this download tools.