Code Monkey home page Code Monkey logo

bookhunter's Introduction

⏬ bookhunter

LICENSE Language Go Report Card Release

Downloading books from talebook, SoBooks 中小学教材 and Telegram Channels. This is a totally rewritten fork compared to its original version.

🚧 Development

  1. Go Releaser is used for releasing and local building
  2. golangci-lint is used for code style.
  3. pre-commit is used for checking code before committing.

💾 Install

🍎 Homebrew (for macOS, Linux)

brew tap bookstairs/tap
brew install bookhunter

💻 Scope (for Windows)

scoop bucket add bookstairs https://github.com/bookstairs/scoop-bucket.git
scoop install bookstairs/bookhunter

🛠 Manually

Download the latest release in release page. Choose related tarball by your running environment.

📚 Usage

Website Address Direct Download Aliyun Lanzou Telecom
智慧教育平台 https://basic.smartedu.cn/tchMaterial
Talebook https://github.com/talebook/talebook
SoBooks https://sobooks.net
Telegram https://t.me
Hsu Life https://book.hsu.life

Login Aliyundrive to get the refreshToken

We would show a QR code at the first time. And cache the refreshToken after successfully login.

bookhunter aliyun

Download textbooks for Kids

Usage:
  bookhunter k12 [flags]

Flags:
  -d, --download string   The book directory you want to use (default ".")
  -h, --help              help for k12
      --ratelimit int     The allowed requests per minutes for every thread (default 30)
  -t, --thread int        The number of download thead (default 1)

Global Flags:
  -c, --config string       The config path for bookhunter
      --proxy string        The request proxy
  -a, --user-agent string   The request user-agent (default "Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/13.0 Firefox/13.0")
      --verbose             Print all the logs for debugging

Register account in Talebook

Usage:
  bookhunter talebook register [flags]

Flags:
  -e, --email string      The talebook email
  -h, --help              help for register
  -p, --password string   The talebook password
  -u, --username string   The talebook username
  -w, --website string    The talebook link

Global Flags:
  -c, --config string       The config path for bookhunter
      --proxy string        The request proxy
  -a, --user-agent string   The request user-agent (default "Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/13.0 Firefox/13.0")
      --verbose             Print all the logs for debugging

Download books from Talebook

Usage:
  bookhunter talebook download [flags]

Flags:
  -d, --download string   The book directory you want to use (default ".")
  -f, --format strings    The file formats you want to download (default [epub,azw3,mobi,pdf,zip])
  -h, --help              help for download
  -i, --initial int       The book id you want to start download (default 1)
  -p, --password string   The talebook password
      --ratelimit int     The allowed requests per minutes for every thread (default 30)
  -r, --rename            Rename the book file by book id
  -t, --thread int        The number of download thead (default 1)
  -u, --username string   The talebook username
  -w, --website string    The talebook link

Global Flags:
  -c, --config string       The config path for bookhunter
      --proxy string        The request proxy
  -a, --user-agent string   The request user-agent (default "Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/13.0 Firefox/13.0")
      --verbose             Print all the logs for debugging

Download books from SoBooks

Usage:
  bookhunter sobooks [flags]

Flags:
      --code string       The secret code for SoBooks (default "844283")
  -d, --download string   The book directory you want to use (default ".")
  -e, --extract           Extract the archive file for filtering
  -f, --format strings    The file formats you want to download (default [epub,azw3,mobi,pdf,zip])
  -h, --help              help for sobooks
  -i, --initial int       The book id you want to start download (default 1)
      --ratelimit int     The allowed requests per minutes for every thread (default 30)
  -r, --rename            Rename the book file by book id
  -t, --thread int        The number of download thead (default 1)

Global Flags:
  -c, --config string       The config path for bookhunter
      --proxy string        The request proxy
  -a, --user-agent string   The request user-agent (default "Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/13.0 Firefox/13.0")
      --verbose             Print all the logs for debugging

Download books from Telegram groups

Example command: bookhunter telegram --appID ****** --appHash ****** -k https://t.me/MothLib

Please refer Creating your Telegram Application to obtain your appID and appHash.

Usage:
  bookhunter telegram [flags]

Flags:
      --appHash string     The app hash for telegram
      --appID int          The app id for telegram
      --channelID string   The channel id for telegram
  -d, --download string    The book directory you want to use (default ".")
  -e, --extract            Extract the archive file for filtering
  -f, --format strings     The file formats you want to download (default [epub,azw3,mobi,pdf,zip])
  -h, --help               help for telegram
  -i, --initial int        The book id you want to start download (default 1)
      --mobile string      The mobile number, we will add +86 as default zone code
      --ratelimit int      The allowed requests per minutes for every thread (default 30)
      --refresh            Refresh the login session
  -r, --rename             Rename the book file by book id
  -t, --thread int         The number of download thead (default 1)

Global Flags:
  -c, --config string       The config path for bookhunter
      --proxy string        The request proxy
  -a, --user-agent string   The request user-agent (default "Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/13.0 Firefox/13.0")
      --verbose             Print all the logs for debugging

Download books from Hsu Life

Example command: bookhunter hsu --username ****** --password ******

Usage:
  bookhunter hsu [flags]

Flags:
  -d, --download string   The book directory you want to use (default "/Users/Yufan/Developer/bookstairs/bookhunter")
  -f, --format strings    The file formats you want to download (default [epub,azw3,mobi,pdf,zip])
  -h, --help              help for hsu
  -i, --initial int       The book id you want to start download (default 1)
  -p, --password string   The hsu.life password
      --ratelimit int     The allowed requests per minutes for every thread (default 30)
  -r, --rename            Rename the book file by book id
  -t, --thread int        The number of download thead (default 1)
  -u, --username string   The hsu.life username

Global Flags:
  -c, --config string     The config path for bookhunter
  -k, --keyword strings   The keywords for books
      --proxy string      The request proxy
      --retry int         The retry times for a failed download (default 3)
  -s, --skip-error        Continue to download the next book if the current book download failed (default true)
      --verbose           Print all the logs for debugging

bookhunter's People

Contributors

jianyun8023 avatar jinyuliu avatar syhily avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bookhunter's Issues

[sanqiu] Support downloading books from aliyun drive

Sanqiu provides a variety of web addresses to download, the current 189cloud shared links are very slow to parse and download. Resolving aliyun drive is a viable solution.

bookhunter sanqiu -f epub --refreshToken xxxxxx

version subcommand can not show program version

image

How did i install bookhunter?

go install  github.com/bibliolater/bookhunter@latest

What is my computer platform?

Windows 10 

Which version of your golang compile?

go version go1.18 windows/amd64

不支持windows 7?

  • Version:0.14.0
  • Platform:64-bit Windows 7

运行后出现如下错误提示:
Exception 0xc0000005 0x8 0x0 0x0
PC=0x0

runtime.asmstdcall()
/opt/hostedtoolcache/go/1.21.5/x64/src/runtime/sys_windows_amd64.s:65 +0
x75 fp=0x22fc70 sp=0x22fc50 pc=0x471235
rax 0x0
rbx 0x1e3f080
rcx 0x1e95180
rdi 0x7fffffde000
rsi 0x22fe78
rbp 0x22fdb0
rsp 0x22fc48
r8 0x0
r9 0x22feb8
r10 0x1
r11 0x0
r12 0x22fea0
r13 0x20
r14 0x1e3ea20
r15 0xfe80
rip 0x0
rflags 0x10293
cs 0x33
fs 0x53
gs 0x2b

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.