mirror of
https://github.com/bestnite/bilinovel-downloader.git
synced 2025-10-25 16:51:01 +00:00
60843869892bd34d86b322f3b1c78116f496ba3b
This commit replaces the `chromedp` library with `playwright-go` for browser automation within the Bilinovel downloader. Changes include: * Updated `Bilinovel` struct to manage Playwright browser, context, and page instances. * Rewrote `initBrowser` and `Close` methods to use Playwright's API for browser lifecycle management. * Refactored `processContentWithChromedp` to `processContentWithPlaywright`, adapting the logic to use Playwright's page evaluation capabilities. * Removed unused `context` and `time` imports. * Added HTML cleanup in `getChapterByPage` to remove `class` attributes from images and `data-k` attributes from all elements, improving content consistency.
Bilinovel Downloader
这是一个用于从 Bilinovel 下载和生成轻小说 EPUB 电子书的工具。 生成的 EPUB 文件完全符合 EPUB 标准,可以在 Calibre 检查中无错误通过。
使用示例
-
下载整本
https://www.bilinovel.com/novel/2388.htmlbilinovel-downloader download -n 2388 -
下载单卷
https://www.bilinovel.com/novel/2388/vol_84522.htmlbilinovel-downloader download -n 2388 -v 84522 -
对自动生成的 epub 格式不满意可以自行修改后使用命令打包
bilinovel-downloader pack -d <目录路径>
Languages
Go
95.6%
templ
3.5%
CSS
0.9%