Skip to content

A simple tool to scrape and download non-V chapters of any novel from jjwxc.net in .docx format, built with Python and Scrapy | 基于Scrapy开发的晋江爬虫,根据书号下载小说非V章节,生成可编辑的Word文档

Notifications You must be signed in to change notification settings

dev-chenxing/jjwxc-crawler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jjwxc-logo

《重生之我在绿江爪爪巴》

一键下载 晋江文学城 (https://www.jjwxc.net) 网站小说非 V 章节

language: python release version last commit

简体中文 | English

特点功能

  • 命令行界面
  • 支持输出 DOCX 和 TXT 格式
  • 可自定义输出路径
  • ...................

有建议或 bug 可以提 issue.

命令行界面使用命令行 UI 库Rich编写。

界面样例:

安装文档

下载文件

点击 Code - Download ZIP,下载后解压缩得到文件夹,建议重命名为jjwxc-crawler

环境配置

  • Python 3.9.15
  • Windows

安装 Python 后,第一步,打开所在目录的命令行,输入以下命令创建并激活虚拟环境

python -m venv venv   # 创建名为venv的Python虚拟环境
venv\Scripts\activate # Windows系统下激活虚拟环境venv

在Linux系统下,

chmod +x venv/bin/activate 
source venv/bin/activate 

此时命令行前应显示有(venv),表示当前已激活虚拟环境venv

第二步,在虚拟环境内安装 Scrapy 和其他依赖

pip install -r requirements.txt

运行小程序

# 进入程序所在目录
cd jjcrawler

# 运行爬虫命令,其中ID为书号
scrapy crawl novel -a id=ID

# 例如,我要下载书号为1的测试文,则运行以下命令行
scrapy crawl novel -a id=1

下载章节将保存至根目录下的 novels 文件夹

默认输出格式为.docx,如果要更改为.txt 格式输出,可编辑\jjcrawler\jjcrawler\spiders\config.py中参数

# docx | txt
format = "txt"

⬆ 回到顶部

About

A simple tool to scrape and download non-V chapters of any novel from jjwxc.net in .docx format, built with Python and Scrapy | 基于Scrapy开发的晋江爬虫,根据书号下载小说非V章节,生成可编辑的Word文档

Topics

Resources

Stars

Watchers

Forks

Languages