# 书源日记
**Repository Path**: oldbruce/syrj
## Basic Information
- **Project Name**: 书源日记
- **Description**: 书源日记-仅作学习交流之用.
- **Primary Language**: HTML
- **License**: MulanPSL-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 7
- **Created**: 2023-05-15
- **Last Updated**: 2023-05-15
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# 书源日记
#### 介绍
活力宝的书源日记-仅作学习交流之用.
此文仅用于学习交流,严禁用做它用,造成什么后果请自负.
### ☆非得到本人同意,禁止转载,违者必究.毕竟是零零散散的东西.
### 书源日记第一版
```
阅读书源写法
解决搜索30秒的办法,在基本页里登录检查Js里填上
cookie.removeCookie(source.getKey())
result
或者在搜索地址栏清空cookie写法如下
{{cookie.removeCookie(source.getKey())}}
/search0f.html?searchkey={{key}}
基本页请求头
在里面加referer信息破网站防盗链,比如在A网站里面的B链接地址,要是正常访问B链接它会自动跳回到A网站,那么在请求头里面带上'referer':A网站,有可能可以破除它的防盗链
{
'referer':'https://official.bkvvvvv.com/'
}
请求头
{'User-Agent':'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/71.0.3578.141 Safari/534.24 XiaoMi/MiuiBrowser/12.4.14'}
或者
{
'User-Agent': 'Mozilla/5.0 (Linux; Android 11; Pixel 3 XL Build/RQ3A.211001.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/102.0.4988.0 Mobile Safari/537.36 SearchCraft/3.9.2 (Baidu; P1 11) '
}
或者
{"User-Agent": "Mozilla/5.0 (Linux; Android 12; M2011K2C Build/SKQ1.211006.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/102.0.5005.99 Mobile Safari/537.36 T7/12.16 SearchCraft/3.9.1 (Baidu; P1 11)"}
或者
{'User-Agent':'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Mobile Safari/537.36',
"Referer":"http://m.b777777.com/"}
或者
{
"User-Agent":"Mozilla/5.0 (Linux; Android 12; Nexus 5X Build/NRD90M); wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/96.0.4664.104 Mobile Safari/537.36"
}
或者请求头2
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.2;. en-US) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36 Quark/4.6.2.161"
}
URL规则后面加上Java.log查看获取页面调试结果用的
tag.a@hrefjava.log(result)
或者这样写
tag.a@href@js:java.log(result)
跨栏目存取数据
比如在搜索栏的书名里面存了个id这里的@put:{id:$.Id}就是存储数据,括号里的id是名字,:后面的是它要存的内容公式字符等等
Name@put:{id:$.Id}
然后到目录页里面的章节url里面调用它,这里的@get:{id}就是调用前面存储的数据
https://xonhhs.pggfggi.com/BookFiles/Html/@get:{cid}/@get:{id}/{{$.id}}.html
搜索规则下的搜索链接第一页和第二页的网址不同可以这样写:
以下是非js正则的发现规则列表第二页和第一页格式不同的写法
①第一页https://qdjjj9999.net/gudai/
②第二页https://qdjjj9999.net/gudai/index_2.html
可写成
https://qdjjj9.net/gudai/{{page==1?'':'index_'+page+'.html'}}
具体看阅读帮助文档page相关的:
<,{{page}}>
还有种第一页是这样的
https://11111.com/搜索/关键字
第二页是这样的
https://11111.com/搜索/关键字/2.html
这个情况可以这样写
https://11111.com/搜索/关键字<,/{{page}}.html>
作者规则写法
###在这里的作用是只保留###前面的内容,全部写法为##要替换提取的内容或者正则##从前面内容中提取并仅保留的内容或者正则其他内容都抛弃###
tag.a@text##作者:([^"]+)"##$1###
或者
.info@text##作者:(.*?) ##$1###
书籍详情页规则URL
tag.a.1@href@js:'https://www.x777888883xs.com'+result
或者
tag.a@href@js:"https://www.wan8886688ntxt.com/"+result+"/"
或者
tag.a@href,{"headers":{
"Referer":"https://bo885454lf.html5.com/kdread/adread/chapter"
}}
或者
//意思就是在这个a的href属性获得的地址前面加上这##后面的内容
tag.a@href##^##https://whts.com
或者
//意思就是在这个a的href属性获得的地址后面加上这##后面的内容
tag.a@href##$##/sadly_1.html
或者
//前面这段一直到href是获取详情页地址,后面一段的js的具体作用是把获取到的详情页地址里面的www……替换成后面的k……
tag.a.0@href@js:result.replace('www.yea77ge','k.yea77ge')
详情页的分类规则写法
~符号在这里的作用是一次性获取property的category|status|update_time三个属性.功能有点类似&&
[property~=category|status|update_time]@content##\s.*
分类规则写法
在正文里面找到相关内容然后用双大括号加上双@来写内容,这里的双@有时候也可能是$..比如说json的文件的写法
{{@@.info@text##类型:(.*?) ##$1###}},{{@@.status@text}}
详情页的书名规则写法
[property$=book_name]@content
详情页的作者规则写法
[property$=author]@content
详情页最新章节写法
[property$=latest_chapter_name]@content##正文卷.|正文.|VIP章节.|免费章节.|VIP卷.|默认卷.|章节目录.|最新章节.|[\((【].*?[求更票谢乐发订合补加].*?[】)\)]
或者
//前后文字段拼接中间以▪️符号隔开,这个符号也可以用其他任意内容代替
{{@@li.1@text}}▪️{{@@li.3@text}}
或者
.block_txt2@p.6:5@text##最新:(.*)\s更新:20(.*)##$1▪️$2
详情页的简介规则写法
[property$=description]@content##(^|[。!?]+[”」)】]?)##$1
详情页分类的写法
[property~=category|status|update_time]@content##\s\d.*
详情页字数的写法
{{@@#count span.1@text}}字
详情页最新章节的写法
{{@@[property$=chapter_name]@content}} • {{@@[property$=update_time]@content##\s.*}}
详情页的封面规则写法
[property$=image]@content
详情页的目录URL规则写法
//这个比较特殊,有的网站的目录跟详情页是在一起的,但是排序可能是反的,这与某些网站用 text.阅读@href 来得到正确的目录页作用一样,能更简单的把目录列表显示出来为最佳选择
text.[正序]@href
或者
text.阅读@href
搜索栏目下的封面规则:
tag.a.1@href##.*/(\d+)(\d{3})/##https://www.rouziwu.info/files/article/image/$1/$1$2/$1$2s.jpg
或者
a@href##.*/book/(\d+)/##https://imghhhxiaoshuocom.cdn.bcebos.com/img/$1.jpg
搜索栏下的封面规则通过jax跨页面加载写法
a.0@hrefjava.ajax("补全缺失的网址"+result)class.pic@img@src
搜索栏下的章节规则拼接并净化垃圾话
.tabcontent@class.tabvalue.1@tag.td.2@text&&
.tabcontent@class.tabvalue.1@tag.td.1@text&&
.tabcontent@class.tabvalue.1@tag.td.0@text##最后更新:|连载状态:|作品分类:
封面图的另一种写法
class.zp@tag.a@href
var id = result.match(/(\d+)\/?$/)[1];
var iid = parseInt(id/1000);
'https://www.qljgh5.tw/files/article/image/'+iid+'/'+id+'/'+id+'s.jpg';
文字内容不需要左右的[]括号可以这样写:
tag.a.0@text##\[|\]
目录页的章节名去垃圾话
text##正文\s|[\((【].*?[求更票谢乐发订合补加].*?[】)\)]
章节名称通用替换规则:
dd@text##[\((【].*?[求更谢乐发订合补加].*?[】)\)]
或者
tag.a@text@js:result.replace(/[([【\{\(].*?[更合求票赏鲜盟修推歉谢祝节年].*?[)]】\}\)]/,"")
或者
//去除双第N章的章字样,2留1
tag.a@text##第.*?章\s?(第.*?章)(.*$)##$1 $2
章节URL规则适用于动态加载的网页:
tag.a@href@js:result+',{webView:“true”}'
或者
tag.a@href##$##,{'webView':true}
章节URL取到地址进行拼接的
tag.a@href##/(.*?)/(.*?).html##https://www.wanben8888txt.net/api/api.php,{
"charset": "gbk",
"method": "POST", "body":"action=read&id=$1&cid=$2&token="
}
或者
tag.a@href@js:'https://www.8k55ana.com/book/'+result+'.html'
或者
用这个方法取当前详情页的URL来做拆分拼接
//取当前链接里的数字,然后带入新的链接里面去
@js:var bid = baseUrl.match(/\d+/);
java.put('bid', bid);
'https://uk.reade5455r.com/book-read/'+bid+'/{{$.seq}}'
﹉﹉﹉﹉
★详情页+目录页+正文第一章显示在一页的时候的处理方法:
章节名写法
//具体到它的分页显示比如:首页 2/22 下一页 尾页
a.0@text##(\d+)\/\d+##第$1页
其他地方获取内容正常获取,就是在目录页里面的章节URL规则里面这样写:
//意思是跟目录页共用一页作为第一章的网址
{{baseUrl}}
或者
就不填目录链接,目录列表可以填tag.html或tag.body等,章节名称tag.title@text,章节链接填href(获取不到链接,正文就会直接用详情页链接)或者章节链接留空
反正就是要有一个列表能获取到章节名称就行
﹉﹉﹉﹉﹉
简介通用替换规则:
class.intro_info@textNodes##(^|[。!?]+[”」)】]?)##$1
或者
[property$=description]@content##(^|[。!?]+[”」)】]?)##$1
目录下一页规则
//适用于目录列表在详情页属于隐藏标签的
option@value
或者并发加载,多个隐藏按钮一起打开
[name=pageselect] > option!0@value
目录列表规则写法
从id.list开始一直找到tag.dd标签然后把tag.dd的最上面9个排除,因为!号后面的0代表数字1后面的每个数字都是同理加上1算实际对的第几个章节目录
id.list@tag.dl@tag.dd[!0:8]
或者
id.list@tag.dl@tag.dd!0:1:2:3:4:5:6:7:8
目录标签下的目录列表规则
//找div标签里面id是lbks的底下的dl标签下的最后一个dt标签后面的与dt标签同级标签里面找dd标签下的a标签
//div[@id="lbks"]/dl/dt[last()]/following-sibling::dd/a
案列:
- 最新8章节,如果喜欢可以把级放到书架里面随时观看
- 第996章 古之名将
- 第995章 包拯来啦
- 第994章 丢了一魄嗯宁采臣
- 第993章 移山术满级
- 第992章 踏足枉死城
- 第991章 玩家的求助帖
- 第990章 一计不成又生一计
- 第989章 损耗
- 正文
- 第1章 全能王者!瞬间满级
- 第2章 玩家广场热议综合排名第一人
- 第3章 东汉末年冀州阵营
- 第4章 成就勋章
- 第5章 高览
- 第6章 高阶刀法
- 第7章 沙场刀诀
听书源的正文写法
正文规则
result
资源正则
.*\.(mp3|m4a).*
正文去重复章节名
id.contents@html
a=title.replace(/第.*章\s*/,'第.*章')
b=new RegExp(a,'g')
result.replace(b,'')
或者
书源正文规则后面添加 ##{{chapter.title}}
可去除章节名称
正文下一页写法(拼接网址)
var list=[];
if(n=result.match(/\/(\d+)页/)){
for(var i=2;i<=n[1];i++){list.push(baseUrl.replace(/\/$/,"_"+i+"/"))
}}list
正文多个正则拼接
##正则1
result
##正则2
延时执行内容的方法,sleep的值是毫秒,1000等于1秒
Packages.java.lang.Thread.sleep(1000);
result
等待1s之后执行
……………………
JSON隔栏取值写法
$.book_author@put{自定义变量:当前页面获取的值}
$.book_author@put:{bid:book_id}
跨栏调用的格式是固定的 是这样的@get:{自定义变量},参考下面链接
这里调用本页的json信息可以用双大括号括起来{{$.book_id}} 里面的book_id就是要取的内容,参考下面链接
http://123456.com/{{$.book_id}}_@get:{bid}/1.html
……………………
漫画源正文
#cp_img@html##src.*\"
@js:result.replace(/data-original/g,"src")
漫画源正文的图片样式
FULL
发现页发现地址规则案列:
[{"title":"❀榜单❀","url":"","style":{"layout_flexBasisPercent":1,"layout_flexGrow":1}},
{"title":"总点击榜","url":"/top_allvisit/{{page}}.html","style":{"layout_flexBasisPercent":0.25,"layout_flexGrow":1}},
{"title":"月点击榜","url":"/top_monthvisit/{{page}}.html","style":{"layout_flexBasisPercent":0.25,"layout_flexGrow":1}},
{"title":"总推荐榜","url":"/top_allvote/{{page}}.html","style":{"layout_flexBasisPercent":0.25,"layout_flexGrow":1}},
{"title":"月推荐榜","url":"/top_monthvote/{{page}}.html","style":{"layout_flexBasisPercent":0.25,"layout_flexGrow":1}},
{"title":"总月票榜","url":"/top_allvipvote/{{page}}.html","style":{"layout_flexBasisPercent":0.25,"layout_flexGrow":1}},
{"title":"总鲜花榜","url":"/top_allflower/{{page}}.html","style":{"layout_flexBasisPercent":0.25,"layout_flexGrow":1}},
{"title":"月勤更榜","url":"/top_monthwords/{{page}}.html","style":{"layout_flexBasisPercent":0.25,"layout_flexGrow":1}},
{"title":"最近更新","url":"/top_lastupdate/{{page}}.html","style":{"layout_flexBasisPercent":0.25,"layout_flexGrow":1}},
{"title":"最新入库","url":"/top_postdate/{{page}}.html","style":{"layout_flexBasisPercent":0.25,"layout_flexGrow":1}},
{"title":"收藏榜","url":"/top_goodnum/{{page}}.html","style":{"layout_flexBasisPercent":0.25,"layout_flexGrow":1}},
{"title":"字数榜","url":"/top_words/{{page}}.html","style":{"layout_flexBasisPercent":0.25,"layout_flexGrow":1}},
{"title":"新书榜","url":"/top_newhot/{{page}}.html","style":{"layout_flexBasisPercent":0.25,"layout_flexGrow":1}},
{"title":"❀分类❀","url":"","style":{"layout_flexBasisPercent":1,"layout_flexGrow":1}},
{"title":"玄幻奇幻","url":"/xuanhuan/{{page}}.html","style":{"layout_flexBasisPercent":0.25,"layout_flexGrow":1}},
{"title":"武侠仙侠","url":"/xianxia/{{page}}.html","style":{"layout_flexBasisPercent":0.25,"layout_flexGrow":1}},
{"title":"都市言情","url":"/dushi/{{page}}.html","style":{"layout_flexBasisPercent":0.25,"layout_flexGrow":1}},
{"title":"穿越架空","url":"/chuanyue/{{page}}.html","style":{"layout_flexBasisPercent":0.25,"layout_flexGrow":1}},
{"title":"女生视觉","url":"/nvsheng/{{page}}.html","style":{"layout_flexBasisPercent":0.25,"layout_flexGrow":1}},
{"title":"精品辣文","url":"/lawen/{{page}}.html","style":{"layout_flexBasisPercent":0.25,"layout_flexGrow":1}}]
```
### 日记第二版,自己折腾自己用
```
阅读书源写法
解决搜索30秒的办法,在基本页里登录检查Js里填上
cookie.removeCookie(source.getKey())
result
或者在搜索地址栏清空cookie写法如下
{{cookie.removeCookie(source.getKey())}}
/search0f.html?searchkey={{key}}
基本页请求头
在里面加referer信息破网站防盗链,比如在A网站里面的B链接地址,要是正常访问B链接它会自动跳回到A网站,那么在请求头里面带上'referer':A网站,有可能可以破除它的防盗链
{
'referer':'https://official.bkvvvvv.com/'
}
或者
{"referer":"https://mjjxs.net"}
或者
书源基本页面,请求头,@js:JSON.stringify({"referer":baseUrl})
{'User-Agent':'Mozilla/5.0 (Linux; Android 11; PCAM10 Build/RP1A.200720.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.106 Mobile Safari/537.36'}
请求头
{'User-Agent':'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/71.0.3578.141 Safari/534.24 XiaoMi/MiuiBrowser/12.4.14'}
或者
{
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"
}
或者
{
'User-Agent': 'Mozilla/5.0 (Linux; Android 11; Pixel 3 XL Build/RQ3A.211001.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/102.0.4988.0 Mobile Safari/537.36 SearchCraft/3.9.2 (Baidu; P1 11) '
}
或者
{"User-Agent": "Mozilla/5.0 (Linux; Android 12; M2011K2C Build/SKQ1.211006.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/102.0.5005.99 Mobile Safari/537.36 T7/12.16 SearchCraft/3.9.1 (Baidu; P1 11)"}
或者
{'User-Agent':'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Mobile Safari/537.36',
"Referer":"http://m.b777777.com/"}
或者
{
"User-Agent":"Mozilla/5.0 (Linux; Android 12; Nexus 5X Build/NRD90M); wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/96.0.4664.104 Mobile Safari/537.36"
}
或者请求头2
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.2;. en-US) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36 Quark/4.6.2.161"
}
或者
{'webView': true,"header":{"referer":"https://mjjxs.net"}}
URL规则后面加上Java.log查看获取页面调试结果用的
tag.a@hrefjava.log(result)
或者这样写
tag.a@href@js:java.log(result)
跨栏目存取数据
比如在搜索栏的书名里面存了个id这里的@put:{id:$.Id}就是存储数据,括号里的id是名字,:后面的是它要存的内容公式字符等等
Name@put:{id:$.Id}
然后到目录页里面的章节url里面调用它,这里的@get:{id}就是调用前面存储的数据
https://conhhs.pggfggi.com/BookFiles/Html/@get:{cid}/@get:{id}/{{$.id}}.html
搜索规则下的搜索链接第一页和第二页的网址不同可以这样写:
以下是非js正则的发现规则列表第二页和第一页格式不同的写法
①第一页https://qdjjj9.net/gudai/
②第二页https://qdjjj9.net/gudai/index_2.html
可写成
https://qdjjj9.net/gudai/{{page==1?'':'index_'+page+'.html'}}
具体看阅读帮助文档page相关的:
<,{{page}}>
还有种第一页是这样的
https://11111.com/搜索/关键字
第二页是这样的
https://11111.com/搜索/关键字/2.html
这个情况可以这样写
https://11111.com/搜索/关键字<,/{{page}}.html>
作者规则写法
###在这里的作用是只保留###前面的内容,全部写法为##要替换提取的内容或者正则##从前面内容中提取并仅保留的内容或者正则其他内容都抛弃###
tag.a@text##作者:([^"]+)"##$1###
或者
.info@text##作者:(.*?) ##$1###
或者
##作者[::]([^<]+)<##$1###
书籍详情页规则URL
tag.a.1@href@js:'https://www.x7773xs.com'+result
或者
tag.a@href@js:"https://www.wan888ntxt.com/"+result+"/"
或者
tag.a@href,{"headers":{
"Referer":"https://bo454lf.html5.qq.com/kdread/adread/chapter"
}}
或者
//意思就是在这个a的href属性获得的地址前面加上这##后面的内容
tag.a@href##^##https://whts.com
或者
//意思就是在这个a的href属性获得的地址后面加上这##后面的内容
tag.a@href##$##/sadly_1.html
或者
//前面这段一直到href是获取详情页地址,后面一段的js的具体作用是把获取到的详情页地址里面的www……替换成后面的k……
tag.a.0@href@js:result.replace('www.yexia77ge','k.yexia77ge')
或者
//当前页的url
{{baseUrl}}
详情页或者搜索页分类规则写法
在正文里面找到相关内容然后用双大括号加上双@来写内容,这里的双@有时候也可能是$..比如说json的文件的写法
{{@@.info@text##类型:(.*?) ##$1###}},{{@@.status@text}}
……………………………………
详情页的书名规则写法
[property$=book_name]@content
详情页的作者规则写法
[property$=author]@content
详情页的分类规则写法
~符号在这里的作用是一次性获取property的category|status|update_time三个属性.功能有点类似&&
[property~=category|status|update_time]@content##\s.*
或者
[property~=category|status|update_time]@content##\s\d.*
详情页字数拼接的写法
{{@@#csount span.1@text}}字
或者
class.xxx@tag.a@text##$##万字
详情页最新章节写法
[property$=latest_chapter_name]@content##正文卷.|正文.|VIP章节.|免费章节.|VIP卷.|默认卷.|章节目录.|最新章节.|[\((【].*?[求更票谢乐发订合补加].*?[】)\)]
或者
.book_update:contains(最新章节:) > a@text
##[\((【].*?[求更谢乐发订合补加].*?[】)\)]|^章节目录\s*
或者
//前后文字段拼接中间以▪️符号隔开,这个符号也可以用其他任意内容代替
{{@@li.1@text}}▪️{{@@li.3@text}}
或者
.block_txt2@p.6:5@text##最新:(.*)\s更新:20(.*)##$1▪️$2
或者
a.0@hrefjava.ajax('http://www.fenghuaju.com'+result)
class.diswap@p.-1@text&&class.diswap@p.-2@text##最后更新:|最新章节:|直达底部
result.replace(/(.*)\s/,'$1 • ')
result.replace(/\s\d+:\d+:\d+/,'')
result.replace(/^(正文|VIP章节|最新章节)?(\s+|_)|[\(\{({【].*[求更谢乐发推票盟补加字Kk\/].*[\)\})}】]/g,'')
或者
{{@@[property$=chapter_name]@content}} • {{@@[property$=update_time]@content##\s.*}}
详情页的简介规则写法
[property$=description]@content##(^|[。!?]+[”」)】]?)##$1
或者
.book_intro:contains(简介:)@textNodes
##(^|[。!?]+[”」)】]?)##$1
result##\s*([^)]*本书网址[^)]*)\s*
详情页的封面规则写法
[property$=image]@content
详情页的目录URL规则写法
//这个比较特殊,有的网站的目录跟详情页是在一起的,但是排序可能是反的,这与某些网站用 text.阅读@href 来得到正确的目录页作用一样,能更简单的把目录列表显示出来为最佳选择
text.[正序]@href
或者
text.阅读@href
搜索栏目下的封面规则:
tag.a.1@href##.*/(\d+)(\d{3})/##https://www.rouziwu.info/files/article/image/$1/$1$2/$1$2s.jpg
或者
a@href##.*/book/(\d+)/##https://imghhhxiaoshuocom.cdn.bcebos.com/img/$1.jpg
搜索栏下的封面规则通过jax跨页面加载写法
a.0@hrefjava.ajax("补全缺失的网址"+result)class.pic@img@src
搜索栏下的章节规则拼接并净化垃圾话
.tabcontent@class.tabvalue.1@tag.td.2@text&&
.tabcontent@class.tabvalue.1@tag.td.1@text&&
.tabcontent@class.tabvalue.1@tag.td.0@text##最后更新:|连载状态:|作品分类:
封面图的另一种写法
class.zp@tag.a@href
var id = result.match(/(\d+)\/?$/)[1];
var iid = parseInt(id/1000);
'https://www.qljgh5.tw/files/article/image/'+iid+'/'+id+'/'+id+'s.jpg';
或者
tag.a@href
var id = result.match(/(\d+)\/?$/)[1];
var iid = parseInt(id/1000);
'https://www.bequgexs.com/files/article/image/'+iid+'/'+id+'/'+id+'s.jpg';
文字内容不需要左右的[]括号可以这样写:
tag.a.0@text##\[|\]
目录页的章节名去垃圾话
text##正文\s|[\((【].*?[求更票谢乐发订合补加].*?[】)\)]
章节名称通用替换规则:
dd@text##[\((【].*?[求更谢乐发订合补加].*?[】)\)]
或者
tag.a@text@js:result.replace(/[([【\{\(].*?[更合求票赏鲜盟修推歉谢祝节年].*?[)]】\}\)]/,"")
或者
//去除双第N章的章字样,2留1
tag.a@text##第.*?章\s?(第.*?章)(.*$)##$1 $2
…………………………
章节URL特殊情况onclick="window.open处理
onclick##'([^']+)##$1###
unescape(result.replace(/\\u/g,'%u'));
应对的情况
-
503、王传贞(2/2)
或者用这个
#next_url@onclick##.*?'([^']+\.).*##$1html
…………………………
章节URL规则适用于动态加载的网页:
tag.a@href@js:result+',{webView:“true”}'
或者
tag.a@href##$##,{'webView':true}
章节URL取到地址进行拼接的
tag.a@href##/(.*?)/(.*?).html##https://www.wanben8888txt.net/api/api.php,{
"charset": "gbk",
"method": "POST", "body":"action=read&id=$1&cid=$2&token="
}
或者
tag.a@href@js:'https://www.8k55ana.com/book/'+result+'.html'
或者
用这个方法取当前详情页的URL来做拆分拼接
//取当前链接里的数字,然后带入新的链接里面去
@js:var bid = baseUrl.match(/\d+/);
java.put('bid', bid);
'https://uk.reade5455r.qq.com/book-read/'+bid+'/{{$.seq}}'
详情页目录地址加请求头案例
/b/{{baseUrl.match(/(\d+)/)[1]}}/more,{"headers":{"x-requested-with":"XMLHttpRequest"}}
﹉﹉﹉﹉
★详情页+目录页+正文第一章显示在一页的时候的处理方法:
章节名写法
//具体到它的分页显示比如:首页 2/22 下一页 尾页
a.0@text##(\d+)\/\d+##第$1页
其他地方获取内容正常获取,就是在目录页里面的章节URL规则里面这样写:
//意思是跟目录页共用一页作为第一章的网址
{{baseUrl}}
或者
就不填目录链接,目录列表可以填tag.html或tag.body等,章节名称tag.title@text,章节链接填href(获取不到链接,正文就会直接用详情页链接)或者章节链接留空
反正就是要有一个列表能获取到章节名称就行
﹉﹉﹉﹉﹉
简介通用替换规则:
class.intro_info@textNodes##(^|[。!?]+[”」)】]?)##$1
或者
[property$=description]@content##(^|[。!?]+[”」)】]?)##$1
目录下一页规则
//适用于目录列表在详情页属于隐藏标签的
option@value
或者并发加载,多个隐藏按钮一起打开 [name=pageselect] > option!0@value
目录列表规则写法
从id.list开始一直找到tag.dd标签然后把tag.dd的最上面9个排除,因为!号后面的0代表数字1后面的每个数字都是同理加上1算实际对的第几个章节目录
id.list@tag.dl@tag.dd[!0:8]
或者
id.list@tag.dl@tag.dd!0:1:2:3:4:5:6:7:8
目录标签下的目录列表规则
//找div标签里面id是lbks的底下的dl标签下的最后一个dt标签后面的与dt标签同级标签里面找dd标签下的a标签
//div[@id="lbks"]/dl/dt[last()]/following-sibling::dd/a
案列:
- 最新8章节(倒叙),如果喜欢可以把穿越万界:神功自动满级放到书架里面随时观看
- 第996章 古之名将
- 第995章 包拯
- 第994章 丢了一魄的宁采臣
- 第993章 移山术满级
- 第992章 踏足枉死城
- 第991章 玩家的求助帖
- 第990章 一计不成又生一计
- 第989章 损耗
- 正文
- 第1章 全能王者!瞬间满级
- 第2章 玩家广场热议综合排名第一人
- 第3章 东汉末年冀州阵营
- 第4章 成就勋章
- 第5章 高览
- 第6章 高阶刀法
- 第7章 沙场刀诀
听书源的正文写法
正文规则
result
资源正则
.*\.(mp3|m4a).*
正文去重复章节名
id.contents@html
a=title.replace(/第.*章\s*/,'第.*章')
b=new RegExp(a,'g')
result.replace(b,'')
或者
书源正文规则后面添加 ##{{chapter.title}}
可去除章节名称
或者
rep='\\s*'+String(book.durChapterTitle.replace(/[^\\u4e00-\\u9fa5\d]/g,'')).split('').toArray().join('[^\\u4e00-\\u9fa5]{0,2}?')+'\\s*';
reg=new RegExp(rep,'gi');
result.replace(reg,'');
或者
rep='\\s*'+book.durChapterTitle.replace(/[^\\u4e00-\\u9fa5\d]/g,'').replace(/\u3002|\uff1f|\uff01|\uff0c|\u3001|\uff1b|\uff1a|\u201c|\u201d|\u2018|\u2019|\uff08|\uff09|\u300a|\u300b|\u3010|\u3011|\u007e
/g,'').split('').join('[\s\S]{0,2}?')+'\\s*';
reg=new RegExp(rep,'gi');
result.replace(reg,'');
或者
rep='\\s*'+book.durChapterTitle.replace(/((?=[\x21-\x7e]+)[^A-Za-z0-9])|[\u3002\uff1b\uff0c\uff1a\u201c\u201d\uff08\uff09\u3001\uff1f\u300a\u300b’]/g,'').split('').join('[\\s\\S]{0,2}?')+'\\s*';
reg=new RegExp(rep,'gi');
result.replace(reg,'');
正文下一页写法1
if (result.indexOf("next.png") > -1) {
mat = baseUrl.match(/\/\d+(_(\d+))?\.html/);
page = Number(mat[2]||1)+1;
baseUrl.replace(/\/(\d+)(_(\d+))?.html/,'/$1_'+page+'.html');
}
正文下一页写法2
:contains(下一章)@href##(^.*_\d+.*$|^)##$1###
正文下一页写法(拼接网址)
var list=[];
if(n=result.match(/\/(\d+)页/)){
for(var i=2;i<=n[1];i++){list.push(baseUrl.replace(/\/$/,"_"+i+"/"))
}}list
或者
text.尾页@href
@js:
{n=parseInt(result[0].match(/\/(\d+)\.html/)[1]);
list=[];
for(i=2;i<=n;i++)
{list.push(i+".html");}
list}
或者
text.尾页@href
@js:
n=parseInt(result[0].match(/\/(\d+)\.html/)[1]);
list=[];
for(i=2;i<=n;i++)
list.push(i+".html");
list
或者
text.尾页@href
@js:
{var n=parseInt(result[0].match(/\/(\d+)\.html/)[1]);
var list=[];
for(var i=2;i<=n;i++)
{list.push(i+".html");}
list}
或者
text.尾页@href
@js:
n=parseInt(result[0].match(/\/(\d+)\.html/)[1]);
list=[];
for(i=2;i<=n;i++)
list.push(baseUrl+i+".html");
list
或者
text.尾页@href
@js:
var n=parseInt(result[0].match(/\/(\d+)\.html/)[1]);
var list=[];
for(var i=2;i<=n;i++)
{list.push(baseUrl+i+".html");}
list
或者
@js:
{var n=parseInt(java.ajax(baseUrl).match(/\>(\d+)\<\/span\>页\)当前/)[1]);
var list=[];
for(var i=2;i<=n;i++)
{list.push(i+".html");}
list}
或者
@js:
var n=parseInt(java.ajax(baseUrl).match(/\>(\d+)\<\/span\>页\)当前/)[1]);
var list=[];
for(var i=2;i<=n;i++)
list.push(i+".html");
list
或者
@js:
n=parseInt(java.ajax(baseUrl).match(/\>(\d+)\<\/span\>页\)当前/)[1]);
list=[];
for(i=2;i<=n;i++)
{list.push(baseUrl+i+".html");}
list
或者
@js:
{var n=parseInt(java.ajax(baseUrl).match(/\>(\d+)\<\/span\>页\)当前/)[1]);
var list=[];
for(var i=2;i<=n;i++)
{list.push(baseUrl+i+".html");}
list}
或者
@js:if(result.match(/\>\d+\<\/span\>页\)当前/))
{var n=parseInt(result.match(/\>(\d+)\<\/span\>页\)当前/)[1]);
var list=[];
for(var i=2;i<=n;i++)
{list.push(i+".html");}
list}
或者
@js:if(result.match(/\>\d+\<\/span\>页\)当前/))
{var n=parseInt(result.match(/\>(\d+)\<\/span\>页\)当前/)[1]);
var list=[];
var url=baseUrl;
for(var i=2;i<=n;i++)
{list.push(url+i+".html");}
list}
或者
@js:if(result.match(/\>\d+\<\/span\>页\)当前/))
{var n=parseInt(result.match(/\>(\d+)\<\/span\>页\)当前/)[1]);
var list=[];
for(var i=2;i<=n;i++)
{list.push(baseUrl+i+".html");}
list}
或者
text.下一页@href||text.下一頁@href
或者
##和@js不能同时用,正文规则
要么加上##$##下一页
要么加上@js:result+'下一页'
……………………
正文规则去垃圾话
(?s)\n+[^\n]+下载爱阅小说.+
……………………
JSON写法
$.book_author@put{自定义变量:当前页面获取的值}
$.book_author@put:{bid:book_id}
调用的格式是固定的 一定@get:{自定义变量}
这里调用本页的json信息可以用双大括号括起来{{$.book_id}} 里面的book_id就是要取的内容
http://123456.com/{{$.book_id}}_@get:{bid}/1.html
要是通过java打印台打印get数据的时候可以这样写,括号里加引号是针对属于字符串类型,其它类型可不加引号,比如数字类型的
{{java.get("id")}}
或者
@js:
java.get("bid")
漫画源正文
#cp_img@html##src.*\"
@js:result.replace(/data-original/g,"src")
漫画源正文的图片样式
FULL
正文内容多页拼接断句处理办法
可以在替换规则里面这样写
##\s{0,100}\n{0,2}.*(第.*页).*\n{0,2}\s{0,100}
正文末尾去广告
正则:广告XX后面加(.|\n)*$可以屏蔽XX后面的内容
或者开头去广告
正则:^(.|\n)*?广告
发现页发现的写法:
[{"title":"❀榜单❀","url":"","style":{"layout_flexBasisPercent":1,"layout_flexGrow":1}}, {"title":"总点击榜","url":"/top_allvisit/{{page}}.html","style":{"layout_flexBasisPercent":0.25,"layout_flexGrow":1}}, {"title":"月点击榜","url":"/top_monthvisit/{{page}}.html","style":{"layout_flexBasisPercent":0.25,"layout_flexGrow":1}}, {"title":"总推荐榜","url":"/top_allvote/{{page}}.html","style":{"layout_flexBasisPercent":0.25,"layout_flexGrow":1}}, {"title":"月推荐榜","url":"/top_monthvote/{{page}}.html","style":{"layout_flexBasisPercent":0.25,"layout_flexGrow":1}}, {"title":"总月票榜","url":"/top_allvipvote/{{page}}.html","style":{"layout_flexBasisPercent":0.25,"layout_flexGrow":1}}, {"title":"总鲜花榜","url":"/top_allflower/{{page}}.html","style":{"layout_flexBasisPercent":0.25,"layout_flexGrow":1}}, {"title":"月勤更榜","url":"/top_monthwords/{{page}}.html","style":{"layout_flexBasisPercent":0.25,"layout_flexGrow":1}}, {"title":"最近更新","url":"/top_lastupdate/{{page}}.html","style":{"layout_flexBasisPercent":0.25,"layout_flexGrow":1}}, {"title":"最新入库","url":"/top_postdate/{{page}}.html","style":{"layout_flexBasisPercent":0.25,"layout_flexGrow":1}}, {"title":"收藏榜","url":"/top_goodnum/{{page}}.html","style":{"layout_flexBasisPercent":0.25,"layout_flexGrow":1}}, {"title":"字数榜","url":"/top_words/{{page}}.html","style":{"layout_flexBasisPercent":0.25,"layout_flexGrow":1}}, {"title":"新书榜","url":"/top_newhot/{{page}}.html","style":{"layout_flexBasisPercent":0.25,"layout_flexGrow":1}}, {"title":"❀分类❀","url":"","style":{"layout_flexBasisPercent":1,"layout_flexGrow":1}}, {"title":"玄幻奇幻","url":"/xuanhuan/{{page}}.html","style":{"layout_flexBasisPercent":0.25,"layout_flexGrow":1}}, {"title":"武侠仙侠","url":"/xianxia/{{page}}.html","style":{"layout_flexBasisPercent":0.25,"layout_flexGrow":1}}, {"title":"都市言情","url":"/dushi/{{page}}.html","style":{"layout_flexBasisPercent":0.25,"layout_flexGrow":1}}, {"title":"穿越架空","url":"/chuanyue/{{page}}.html","style":{"layout_flexBasisPercent":0.25,"layout_flexGrow":1}}, {"title":"女生视觉","url":"/nvsheng/{{page}}.html","style":{"layout_flexBasisPercent":0.25,"layout_flexGrow":1}}, {"title":"精品辣文","url":"/lawen/{{page}}.html","style":{"layout_flexBasisPercent":0.25,"layout_flexGrow":1}}]
```
祝大家生活愉快!