书源制作

2021-09-15  本文已影响0人  CGsir陈

一般在电脑端制作会比较容易,本章讲的是在电脑端制作的方法。
以下的例子是使用CSS规则来自作书源,https://www.jianshu.com/p/58c61123b2bd
笔趣阁 https://www.ybiquge.com/
{
"bookSourceName": "笔趣阁",
"bookSourceUrl": "http://www.ybiquge.com/",
"exploreUrl": "",
"ruleBookInfo": {
"author": "[property=author]@content", "coverUrl": "[property=image]@content",
"intro": "[property=description]@content", "kind": "[property=category]@content&&[property=status]@content", "lastChapter": "[property=latest_chapter_name]@content",
"name": "[property=book_name]@content", "wordCount": "[property=update_time]@content"
},
"ruleContent": {
"content": "id.content@textNodes"
},
"ruleExplore": {},
"ruleSearch": {
"author": "span.2@text",
"bookList": "class.result-item",
"bookUrl": "a.1@href",
"coverUrl": "img@src",
"intro": "p.0@text",
"kind": "span.4@text",
"lastChapter": "a.2@text",
"name": "a.1@text",
"wordCount": "span.6@text"
},
"ruleToc": {
"chapterList": "id.list@dd",
"chapterName": "a@text",
"chapterUrl": "a@href"
},
"searchUrl": "http://www.ybiquge.com/search.php?q={{key}}&p={{page}}",
}
搜索规则searchUrl:搜索词由{{key}}来标识,页码由{{page}}表示

123.png
搜索结果列表规则ruleSearch:bookUrl 书籍详情链接,author作者,bookList书籍列表,coverUrl封面图,intro书籍介绍,kind书籍类型,lastChapter最新章节,name书籍名称,wordCount书籍字数
右击网页,显示源代码,可以在源代码里面查看相应的标签
124.png

章节目录规则ruleToc:chapterList章节列表,chapterName章节名称,chapterUrl内容链接


125.png

本章只是大概讲述了一下如何制作简单书源,更多复杂规则,我们后面会慢慢来,有兴趣的,可以先按这个方法先玩一下,有不明白,欢迎留言,共同进步。🤗

一些大佬制作的书源
https://gitee.com/zoeybai/read

上一篇 下一篇

猜你喜欢

热点阅读