Skip to main content

A command-line tool for downloading Chinese web novels from Qidian and similar platforms.

Project description

novel-downloader

一个基于 DrissionPagerequests 的小说下载器。


项目简介

novel-downloader 是一个通用的小说下载库 / CLI 工具,

  • 大多数支持的站点仅依赖 requests 进行 HTTP 抓取
  • 对于起点中文网 (Qidian), 可在配置中选择:
    • mode: session : 纯 Requests 模式
    • mode: browser : 基于 DrissionPage 驱动 Chrome 的浏览器模式 (可处理更复杂的 JS/加密)。
  • 若配置 login_required: true, 程序会在运行时自动检查登录状态, 支持自动重用历史 Cookie, 仅在首次登录或 Cookie 失效时需要人工介入:
    • 若使用 browser 模式, 请在程序打开的浏览器窗口登录, 登录后回车继续
    • 若使用 session 模式, 请根据程序提示粘贴浏览器中登录成功后的 Cookie (复制 Cookies)

功能特性

  • 爬取起点中文网的小说章节内容 (支持免费与已订阅章节)
  • 爬取部分小说网站
  • 断点续爬
  • 自动整合所有章节并导出为
    • TXT
    • EPUB
  • 支持活动广告过滤:
    • 章节标题
    • 章节正文
    • 作者说

快速开始

# 克隆 + 安装
pip install novel-downloader

# 如需支持字体解密功能 (decode_font), 请使用:
# pip install novel-downloader[font-recovery]

# 初始化默认配置 (生成 settings.toml)
novel-cli settings init

# 编辑 ./settings.toml 完成 site/book_ids 等
# 可查看 docs/4-settings-schema.md

# 运行下载
novel-cli download 123456

从 GitHub 安装 (开发版)

如需体验开发中的最新功能, 可通过 GitHub 安装:

git clone https://github.com/BowenZ217/novel-downloader.git
cd novel-downloader
pip install .
# 或安装带可选功能:
# pip install .[font-recovery]

文档结构


项目说明

  • 本项目仅供学习和研究使用, 不得用于任何商业或违法用途。请遵守目标网站的 robots.txt 以及相关法律法规。
  • 本项目开发者对因使用该工具所引起的任何法律责任不承担任何责任。
  • 如果遇到网站结构变化或其他问题, 可能导致程序无法正常工作, 请自行调整代码或寻找其他解决方案。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

novel_downloader-1.3.2.tar.gz (155.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

novel_downloader-1.3.2-py3-none-any.whl (234.5 kB view details)

Uploaded Python 3

File details

Details for the file novel_downloader-1.3.2.tar.gz.

File metadata

  • Download URL: novel_downloader-1.3.2.tar.gz
  • Upload date:
  • Size: 155.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for novel_downloader-1.3.2.tar.gz
Algorithm Hash digest
SHA256 5117a4c9d8d632d2b1cfffc003e18ea3071b9e7185d724d0afd4d70e62dfe19b
MD5 f248d31dc89ca3da07b697d5f5ec8231
BLAKE2b-256 9a69afa4e03777f992dd09f132b636bb8f9ae641d4a5c04c9e005627571eab7e

See more details on using hashes here.

File details

Details for the file novel_downloader-1.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for novel_downloader-1.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ce5ebb6e51d074bf5fff1cceb98de8219901f056c1adfc1b1902335f6ecd0a5b
MD5 d45a52ecb0bb908ad41f36da0d2fb842
BLAKE2b-256 b7d43f7fa24f5ac6efe500833d831aa09666e2b4373b443ad47f949211aa428b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page