mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-25 11:36:45 +08:00
mod: cid获取
This commit is contained in:
@@ -154,4 +154,7 @@ class Api {
|
||||
// 记录视频播放进度
|
||||
// https://github.com/SocialSisterYi/bilibili-API-collect/blob/master/docs/video/report.md
|
||||
static const String heartBeat = '/x/click-interface/web/heartbeat';
|
||||
|
||||
// 查询视频分P列表 (avid/bvid转cid)
|
||||
static const String ab2c = '/x/player/pagelist';
|
||||
}
|
||||
|
||||
@@ -80,4 +80,15 @@ class SearchHttp {
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
static Future ab2c({int? aid, String? bvid}) async {
|
||||
Map<String, dynamic> data = {};
|
||||
if (aid != null) {
|
||||
data['aid'] = aid;
|
||||
} else if (bvid != null) {
|
||||
data['bvid'] = bvid;
|
||||
}
|
||||
var res = await Request().get(Api.ab2c, data: {...data});
|
||||
return res.data['data'].first['cid'];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user