开发进度
- [x] 书源编辑段评规则UI #2250
- [ ] 阅读界面UI
- [ ] 具体功能实现
功能描述
- 像起点,QQ阅读,纵横等网站一样的段评
- 还希望有段评缓存功能,像QQ阅读一样能够保存评论离线阅读
然后,正版网站的评论api是开放的,无论是不是收费章节,所以不要质疑可行性
期望实现方式
起点的api结构是:
先通过reviewSummary
获取段评的数量
然后通过reviewList
获取具体的段评
如果要获取评论的回复,则要使用quoteReviewList
据了解,QQ阅读,纵横的api结构也大差不差,因此可以作为通用的框架来判断
还有一个细节,起点的reviewList
有一个quoteContent
,这个quoteContent
是该段评所评论的段落的内容,可以通过字符串比较来判断这个段落是否属于这个段落 ~甚至有可能通过这个手段来从正版获得内容(幻想~
附加信息
我已经把起点有关的api扒下来了,下面是api获取到的内容demo,可以作为框架参考:
希望大佬能教教我手机程序的请求拦截,只会用devtools的菜鸟哭了,扒不了QQ阅读的api
reviewSummary
: 获取段评的数量信息,就像是刚刚打开起点阅读界面的时候,每个段落评论数量的信息
URL:https://read.qidian.com/ajax/chapterReview/reviewSummary?_csrfToken={_csrfToken}&bookId={bookId}&chapterId={chapterId}
{
"code": 0,
"msg": "success",
"data": {
"list": [
{
"segmentId": -1,
"reviewNum": 98,
"containSelf": false,
"isHotSegment": false
},
{
"segmentId": 1,
"reviewNum": 44,
"containSelf": false,
"isHotSegment": true
},
{
"segmentId": 2,
"reviewNum": 45,
"containSelf": false,
"isHotSegment": true
}
],
"total": 3
}
}
-1
:章节名的段落id
reviewList
:具体的评论列表
URL:https://read.qidian.com/ajax/chapterReview/reviewList?_csrfToken={_csrfToken}&bookId={bookId}&chapterId=${chapterId}&segmentId={segmentId}&type=2&page={page}&pageSize={maxReviewCount}
起点有一次性请求的段评数量的限制,可以把 maxReviewCount
设置的比较大来解除这个限制
也可以分次请求,page
从1开始计数,如果一个段落的评论已经获取完了,那么isEnd
将会变成1
{
"code": 0,
"msg": "success",
"data": {
"list": [
{
"reviewId": "737964112289726464",
"cbid": "21960119108488104",
"ccid": "61191279283257335",
"guid": "247430484",
"userId": "313229665",
"nickName": "朕的几何染着血",
"avatar": "https://qidian.qpic.cn/qd_face/349573/8432018/100",
"segmentId": 106,
"content": "查水表的",
"status": 1,
"createTime": "05-01 10:02:11",
"updateTime": "2022-06-06 17:38:48",
"quoteReviewId": "0",
"quoteContent": "“哪位!”",
"quoteGuid": "0",
"quoteUserId": "0",
"quoteNickName": "",
"type": 2,
"likeCount": 6,
"dislikeCount": 0,
"userLike": false,
"userDislike": false,
"isSelf": false,
"essenceStatus": false,
"riseStatus": false,
"level": 5,
"imagePre": "",
"imageDetail": "",
"rootReviewId": "737964112289726464",
"rootReviewReplyCount": 0
}
],
"total": 1,
"isEnd": 1
}
}
quoteReviewList
:评论的回复
URL: https://read.qidian.com/ajax/chapterReview/quoteReviewList?_csrfToken={_csrfToken}&reviewId={reviewId}&page={page}&pageSize={maxReviewCount}
和reviewList
差不多
{
"code": 0,
"msg": "success",
"data": {
"quoteReviewInfo": {
"reviewId": "744860259612557312",
"cbid": "21960119108488104",
"ccid": "61191279283257335",
"guid": "800104803528",
"userId": "104803528",
"nickName": "等待消失的爱",
"avatar": "https://qidian.qpic.cn/qd_face/349573/5411122/100",
"segmentId": 100,
"content": "?????????",
"status": 1,
"createTime": "05-20 10:45:01",
"updateTime": "2022-06-10 16:29:20",
"quoteReviewId": "0",
"quoteContent": " “要你何用!!”",
"quoteGuid": "0",
"quoteUserId": "0",
"quoteNickName": "",
"type": 2,
"likeCount": 22,
"dislikeCount": 0,
"userLike": false,
"userDislike": false,
"isSelf": false,
"essenceStatus": false,
"riseStatus": false,
"level": 94,
"imagePre": "",
"imageDetail": "",
"rootReviewId": "744860259612557312",
"rootReviewReplyCount": 1
},
"list": [
{
"reviewId": "745021049921470464",
"cbid": "21960119108488104",
"ccid": "61191279283257335",
"guid": "800005294937",
"userId": "5294937",
"nickName": "蜉蚴特",
"avatar": "https://qidian.qpic.cn/qd_face/349573/25/100",
"segmentId": 100,
"content": "回复 等待消失的爱:",
"status": 1,
"createTime": "05-20 21:23:56",
"updateTime": "2022-06-10 20:04:47",
"quoteReviewId": "744860259612557312",
"quoteContent": " “要你何用!!”",
"quoteGuid": "800104803528",
"quoteUserId": "104803528",
"quoteNickName": "等待消失的爱",
"type": 10,
"likeCount": 6,
"dislikeCount": 0,
"userLike": false,
"userDislike": false,
"isSelf": false,
"essenceStatus": false,
"riseStatus": false,
"level": 95,
"imagePre": "",
"imageDetail": "",
"rootReviewId": "744860259612557312",
"rootReviewReplyCount": 0
}
],
"total": 1,
"isEnd": 1
}
}
效果演示
QQ阅读的界面:
正如上图,大佬们应该都用过QQ阅读或者起点吧(滑稽)如果加上了这功能,是不是就几乎和正版差不多了?(笑
这个功能我已经构思了很久,本来想自己开发的,结果发现了阅读
这个宝玉,就希望能够借助这块宝玉,让自己的设想能够得以实现,我很愿意和大佬们探讨这个功能的实现,希望阅读
能够变得更好!
需求 Stale