feat: 转发动态评论渲染

This commit is contained in:
guozhigq
2023-12-31 15:10:03 +08:00
parent 14aa8c4f36
commit b847cf8c84
5 changed files with 94 additions and 43 deletions

View File

@ -40,9 +40,13 @@ class HtmlHttp {
//
String opusContent =
opusDetail.querySelector('.opus-module-content')!.innerHtml;
String test = opusDetail
.querySelector('.horizontal-scroll-album__pic__img')!
.innerHtml;
String? test;
try {
test = opusDetail
.querySelector('.horizontal-scroll-album__pic__img')!
.innerHtml;
} catch (_) {}
String commentId = opusDetail
.querySelector('.bili-comment-container')!
.className
@ -54,7 +58,7 @@ class HtmlHttp {
'avatar': avatar,
'uname': uname,
'updateTime': updateTime,
'content': test + opusContent,
'content': (test ?? '') + opusContent,
'commentId': int.parse(commentId)
};
} catch (err) {