mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-30 23:58:13 +08:00
fix: 专栏解析失败时白屏
This commit is contained in:
@@ -41,11 +41,10 @@ class HtmlHttp {
|
|||||||
String opusContent =
|
String opusContent =
|
||||||
opusDetail.querySelector('.opus-module-content')!.innerHtml;
|
opusDetail.querySelector('.opus-module-content')!.innerHtml;
|
||||||
String? test;
|
String? test;
|
||||||
try {
|
test = opusDetail
|
||||||
test = opusDetail
|
.querySelector('.horizontal-scroll-album__pic__img')
|
||||||
.querySelector('.horizontal-scroll-album__pic__img')!
|
?.innerHtml ??
|
||||||
.innerHtml;
|
'';
|
||||||
} catch (_) {}
|
|
||||||
|
|
||||||
String commentId = opusDetail
|
String commentId = opusDetail
|
||||||
.querySelector('.bili-comment-container')!
|
.querySelector('.bili-comment-container')!
|
||||||
@@ -96,7 +95,7 @@ class HtmlHttp {
|
|||||||
|
|
||||||
//
|
//
|
||||||
String opusContent =
|
String opusContent =
|
||||||
opusDetail.querySelector('#read-article-holder')!.innerHtml;
|
opusDetail.querySelector('#read-article-holder')?.innerHtml ?? '';
|
||||||
RegExp digitRegExp = RegExp(r'\d+');
|
RegExp digitRegExp = RegExp(r'\d+');
|
||||||
Iterable<Match> matches = digitRegExp.allMatches(id);
|
Iterable<Match> matches = digitRegExp.allMatches(id);
|
||||||
String number = matches.first.group(0)!;
|
String number = matches.first.group(0)!;
|
||||||
|
|||||||
Reference in New Issue
Block a user