跳到主要内容

开始

说明

书源是用于配置阅读应用以获取书籍信息的 JSON 字符串。通过书源,您可以从各种网站获取书籍和漫画信息,例如书籍名称、作者、简介、封面、章节列表等。

本说明文档将介绍如何创建和编辑书源。

准备

建议使用电脑进行json书源的编辑

工具使用

以下是一些常用的书源编辑工具:

  • vscode : JSON 语法高亮和格式化。
  • utools :一款多功能工具,包含 JSON 编辑器、正则表达式工具等。
  1. 进入官网下载 utools , https://www.u.tools/ 并安装

  2. 打开 utools , 点击头像进入插件应用市场,搜索 json ,点击安装json编辑器

    iShot_2024-05-06_09.33.46.png

拷贝模板书源

  1. 拷贝下面的模板json,唤起utools,使用json编辑器打开(打开之后双击utool标题栏可以全屏插件)。
{
"bookSourceComment": "",
"bookSourceName": "漫客栈",
"bookSourceId": "漫客栈",
"bookSourceType": 2,
"bookSourceUrl": "https://www.mkzhan.com/",
"bookSourceCoverUrl": null,
"customOrder": 1,
"from": 1,
"enabled": true,
"enabledCookieJar": false,
"enabledExplore": true,
"enabledReview": false,
"exploreUrl": "热门::/category/?theme_id=1&page={{page}}&&玄幻::/category/?theme_id=12&page={{page}}&&恋爱::/category/?theme_id=3&page={{page}}&&恋爱::/category/?theme_id=4&page={{page}}",
"lastUpdateTime": 1666573793921,
"respondTime": 8535,
"ruleBookInfo": {
"author": "",
"coverUrl": "",
"intro": "div.comic-intro>p.intro@text",
"kind": "div.comic-status@b@text",
"lastChapter": "",
"name": "",
"tocUrl": "{{baseUrl}}"
},
"ruleContent": {
"content": "data.page.image",
"replaceRegex": "",
"nextContentUrl": null,
"contentDecodeParam": null,
"jsFunc": null
},
"ruleExplore": {
"jsonContent": "",
"author": "",
"bookList": "div.cate-comic-list>div",
"bookUrl": "a.cover@href",
"coverUrl": "img@data-src",
"intro": "",
"name": "p.comic__title@text",
"type": "",
"lastChapter": "a.hl@text",
"kind": ""
},
"ruleReview": {},
"ruleSearch": {
"jsonContent": "",
"author": "",
"bookList": "div.common-comic-item",
"bookUrl": "a.cover@href",
"coverUrl": "img@data-src",
"intro": "",
"name": "p.comic__title@text",
"type": "",
"lastChapter": "a.hl@text",
"kind": ""
},
"ruleToc": {
"jsonContent": null,
"chapterList": "ul.chapter__list-box>li[-1:0:-1]",
"chapterName": "a@text",
"chapterUrl": "a@data-hreflink##\\/(\\d+)\\/(\\d+)##https://comic.mkzcdn.com/chapter/content/v1/?chapter_id=$2&comic_id=$1&format=1&quality=1&sign=f27be52e30dd184c2517ad410ecbfde4&type=1&uid=64377073###",
"nextTocUrl": null
},
"searchUrl": "https://www.mkzhan.com/search/?keyword={{key}}"
}

1

json编辑器插件可以自动帮你高亮和格式化json。接下来就可以开始编辑书源了。