fix: dyn comment type

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-04-04 23:40:05 +08:00
parent 21da122902
commit 4aaaffbcea
2 changed files with 5 additions and 3 deletions

View File

@@ -64,11 +64,11 @@ class HtmlHttp {
.innerHtml;
} catch (_) {}
String commentId = opusDetail
List comment = opusDetail
.querySelector('.bili-comment-container')!
.className
.split(' ')[1]
.split('-')[2];
.split('-');
// List imgList = opusDetail.querySelectorAll('bili-album__preview__picture__img');
return {
'status': true,
@@ -76,7 +76,8 @@ class HtmlHttp {
'uname': uname,
'updateTime': updateTime,
'content': (test ?? '') + opusContent,
'commentId': int.parse(commentId)
'commentType': int.parse(comment[1]),
'commentId': int.parse(comment[2]),
};
} catch (err) {
debugPrint('err: $err');

View File

@@ -41,6 +41,7 @@ class DynamicDetailController extends ReplyController {
// 根据jumpUrl获取动态html
reqHtmlByOpusId(int id) async {
var res = await HtmlHttp.reqHtml(id, 'opus');
type = res['commentType'];
oid = res['commentId'];
queryData();
}