File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ class VideoRequest {
4444 List <String > token = [];
4545 final res = await Request ().get (url);
4646 String resString = res.data.toString ();
47+ String firstTitle = '' ;
4748 try {
4849 var document = parse (resString);
4950 final videoTags = document.getElementsByTagName ('video' );
@@ -52,6 +53,7 @@ class VideoRequest {
5253 final element = videoTags[i];
5354 token.add (element.attributes['data-apireq' ] ?? '' );
5455 }
56+ firstTitle = document.getElementsByClassName ('entry-title' ).first.text;
5557 debugPrint ('从网页上成功捕获视频凭据 ${token [0 ]}' );
5658 debugPrint ('合集总长度 ${videoTags .length }' );
5759 } else {
@@ -76,6 +78,9 @@ class VideoRequest {
7678 }
7779 }
7880 }
81+ if (token.isNotEmpty && firstTitle.endsWith ('[01]' )) {
82+ token = token.reversed.toList ();
83+ }
7984 } catch (e) {
8085 debugPrint ('其他错误 ${e .toString ()}' );
8186 return token;
You can’t perform that action at this time.
0 commit comments