![](/api/file/getImage?fileId=5ddbea041563da0012000023) 演示站:[看小说](https://www.kanguo.net) 采集目录站:http://www.biquw.com 该站大约有十多万部作品,全采下来做测试足够了。狂雨的采集主要是这个关联网址的概念要理解,我个人认为是用来做章节列表的。 ## 列表网址 选序列,地址填上 ``` http://www.biquw.com/xs/quanbu-default-0-0-0-0-0-0-[内容].html ``` 页码配置1至5265,每次增加1 ## 列表规则 ### 列表网址 网址规则: ``` <dd><h3><span class="uptime">(*)</span><a href="[内容1]" target="_blank">(*)</a></h3></dd> ``` ### 关联网址 关联页名称:章节列表 从页中提取:默认内容页 是否章节列表:是 获取区间: ``` <div class="book_list">(&)<ul>[内容]</ul>(&)</div> ``` 网址规则: ``` <li><a href=["'][内容1]["']>[章节标题]</a></li> ``` ## 内容规则 ### 栏目规则 入库方式:对应分类 目标页:内容页 规则: ``` <meta property="og:novel:category" content="[内容1]" ``` 栏目转换:将该网站的栏目名称与自己站点的栏目一一对应即可 ### 名称规则 目标页:内容页 规则: ``` <meta property="og:title" content="[内容1]" ``` ### 作者规则 目标页:内容页 规则: ``` <meta property="og:novel:author" content="[内容1]" ``` ### 连载规则 目标页:内容页 规则: ``` <meta property="og:novel:status" content="[内容1]" ``` 连载字符:连载中 完结字符:完本 ### 图片规则 目标页:内容页 规则: ``` <meta property="og:image" content="[内容1]" ``` ### 介绍规则 目标页:内容页 规则: ``` <h3 class="bookinfo_intro"><strong>(*)</strong><br[^>]*>[内容1]<br[^>]*> ``` 规则过滤:p,br ### 章节名称规则 目标页:章节列表 规则: ``` <h1>[内容1]</h1> ``` 内容替换:添加一条,目标:全部章节,替换填空,有些章节标题里会出现“全部章节”的字样 ### 章节内容规则 目标页:章节列表 规则: ``` <div id="htmlContent" class="(*)"[^>]*>[内容1]</div> ``` 过滤规则:a,img,div,p 内容替换,添加以下几项目标(每行一个),替换里同样留空,或者换成自己想要的内容 ``` @@笔.*趣.*阁.*www.*biquge.*info@@ www.biquw.com @@笔.*趣.*网@@ read3; ``` 提交保存,然后自已去试采集几章节,看是否有提示什么问题。 为了方便,我直接把SQL语句列在下面: ```sql INSERT INTO `ky_collect` (`title`, `charset`, `type`, `url_complete`, `url_reverse`, `pic_local`, `source_url`, `section`, `url_rule`, `url_merge`, `url_must`, `url_ban`, `relation_url`, `rule`, `category_way`, `category_fixed`, `category_equivalents`, `status`, `create_time`, `update_time`, `collect_time`, `update`) VALUES ('笔趣网', 'auto', 'novel', 1, 0, 1, '[{"url":"http://www.biquw.com/xs/quanbu-default-0-0-0-0-0-0-[内容].html","type":"1","param":["1","5265","1",0]}]', '', '<dd><h3><span class="uptime">(*)</span><a href="[内容1]" target="_blank">(*)</a></h3></dd>', '', '', '', '[{"title":"章节列表","page":"default","chapter":"1","section":"<div class=\\"book_list\\">(&)<ul>[内容]</ul>(&)</div>","url_rule":"<li><a href=[\\"''][内容1][\\"'']>[章节标题]</a></li>","url_merge":""}]', '{"category":{"field":"category","source":"default","rule":"<meta property=\\"og:novel:category\\" content=\\"[内容1]\\"","merge":"","strip":""},"title":{"field":"title","source":"default","rule":"<meta property=\\"og:title\\" content=\\"[内容1]\\"","merge":"","strip":"","replace":""},"author":{"field":"author","source":"default","rule":"<meta property=\\"og:novel:author\\" content=\\"[内容1]\\"","merge":"","strip":"","replace":""},"serialize":{"field":"serialize","source":"default","rule":"<meta property=\\"og:novel:status\\" content=\\"[内容1]\\"","merge":"","serial":"连载中","over":"完本","strip":"","replace":""},"pic":{"field":"pic","source":"default","rule":"<meta property=\\"og:image\\" content=\\"[内容1]\\"","merge":"","strip":"","replace":""},"content":{"field":"content","source":"default","rule":"<h3 class=\\"bookinfo_intro\\"><strong>(*)<\\/strong><br[^>]*>[内容1]<br[^>]*>","merge":"","strip":"p,br","replace":"[]"},"tag":{"field":"tag","source":"default","rule":"","merge":"","strip":"","replace":""},"chapter_title":{"field":"chapter_title","source":"0","rule":"<h1>[内容1]<\\/h1>","merge":"","strip":"","replace":"[{\\"find\\":\\"全部章节\\",\\"replaces\\":\\"\\"}]"},"chapter_content":{"field":"chapter_content","source":"0","rule":"<div id=\\"htmlContent\\" class=\\"(*)\\"[^>]*>[内容1]<\\/div>","merge":"","strip":"a,img,div,p","replace":"[{\\"find\\":\\"@@笔.*趣.*阁.*www.*biquge.*info@@\\",\\"replaces\\":\\"\\"},{\\"find\\":\\"www.biquw.com\\",\\"replaces\\":\\"www.kanguo.net\\"},{\\"find\\":\\"@@笔.*趣.*网@@\\",\\"replaces\\":\\"\\"},{\\"find\\":\\"read3;\\",\\"replaces\\":\\"\\"}]"}}', 0, 18, '[{"target":"玄幻小说","local":"18"},{"target":"修真小说","local":"18"},{"target":"网游小说","local":"34"},{"target":"都市小说","local":"21"},{"target":"科幻小说","local":"22"},{"target":"穿越小说","local":"20"},{"target":"军史小说","local":"20"},{"target":"言情小说","local":"26"},{"target":"仙侠小说","local":"19"},{"target":"其他小说","local":"35"},{"target":"灵异小说","local":"23"}]', 1, 1573948849, 1574357614, 1574504590, 0); ``` 最后修改:5年前 © 著作权归作者所有