自动化从 轻小说文库 获取 EPUB 格式电子书,并将结果整合为网页呈现:
- mojimoon.github.io/wenku8:EPUB 源 + TXT 源
- 内容全面,但条目数多,可能加载较慢
- 特别感谢 布客新知 整理
- mojimoon.github.io/wenku8/epub.html:EPUB 源
- 仅包含 EPUB 源,适合移动端浏览
如果您觉得这个项目有用,点个 Star 支持一下吧!
克隆仓库并安装依赖:
git clone https://github.com/mojimoon/wenku8
cd wenku8
pip install -r requirements.txt
运行 txt.py
:
scrape_all()
获取最新的 TXT 源下载列表- 输出:
txt/*.csv
- 由于 GitHub API 限制最多显示 1,000 条数据,请检查是否有遗漏。如有,可以手动下载后运行
filelist_to_csv.py
进行转换。
- 输出:
merge_csv()
合并、去重- 输出:
out/txt_list.csv
- 输出:
运行 main.py
:
scrape()
获取最新的 EPUB 源下载列表- 输出:
out/dl.txt
,out/post_list.csv
- 输出:
merge()
合并、去重并与 TXT 源进行匹配- 输出:
out/merged.csv
- 输出:
create_html_merged(), create_html_epub()
生成 HTML 文件- 输出:
public/index.html
,public/epub.html
- 输出:
此外,GitHub Actions 会每天自动运行 main.py
,将 public/
目录提交到 gh-pages
分支并部署到 GitHub Pages。
为加快访问速度,HTML、CSS、JS 文件均已压缩(源代码在 source
目录下),且使用 jsDeliver CDN 加速。
可参考本人博客中 加快 GitHub Pages 国内访问速度 一文。