feat: 直播弹幕

This commit is contained in:
guozhigq
2024-08-18 23:30:51 +08:00
parent 0803444d74
commit 91856b5c21
9 changed files with 876 additions and 20 deletions

View File

@ -29,6 +29,7 @@ class Request {
late String systemProxyPort;
static final RegExp spmPrefixExp =
RegExp(r'<meta name="spm_prefix" content="([^"]+?)">');
static late String buvid;
/// 设置cookie
static setCookie() async {
@ -70,6 +71,8 @@ class Request {
final String cookieString = cookie
.map((Cookie cookie) => '${cookie.name}=${cookie.value}')
.join('; ');
buvid = cookie.firstWhere((e) => e.name == 'buvid3').value;
dio.options.headers['cookie'] = cookieString;
}