feat: 视频操作

This commit is contained in:
guozhigq
2023-05-12 00:03:10 +08:00
parent e426236741
commit 7bcdd209ba
10 changed files with 447 additions and 52 deletions

View File

@ -55,6 +55,17 @@ class Request {
dio.interceptors.add(cookieManager);
}
// 从cookie中获取 csrf token
static Future<String> getCsrf() async {
var cookies = await cookieManager.cookieJar
.loadForRequest(Uri.parse(HttpString.baseApiUrl));
// for (var i in cookies) {
// print(i);
// }
var token = cookies.firstWhere((e) => e.name == 'bili_jct').value;
return token;
}
/*
* config it and create
*/