-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* init bruno * Update change log * Update VIP task's receive logic * Add ogvwatchnew APIs * update bruno scripts * update bruno scripts * init VIP big point ogv watch API * update consts * remove codes that did not pass test * upgrade pkgs * upgrade to dotnet 8 * migrate in docker * updatge change log * update 8.0 in qinglong scripts * update other 6.0 in actions or docs * remove --no-cdn since its obsolute * remove return when install * fix[#824]: log cookie when qinglong save env fail * update change log * Set DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 in qinglong
- Loading branch information
1 parent
62d6f18
commit d76206d
Showing
73 changed files
with
1,935 additions
and
673 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -372,3 +372,6 @@ kustomization.yaml | |
|
||
# ut | ||
coveragereport | ||
|
||
# bruno | ||
bruno/.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
phone= | ||
pwd= | ||
mid= | ||
buvid= | ||
csrf= | ||
access_key= | ||
cookieStr= | ||
device_id= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
meta { | ||
name: combine | ||
type: http | ||
seq: 1 | ||
} | ||
|
||
get { | ||
url: https://api.bilibili.com/x/vip_point/task/combine?access_key={{access_key}}&appKey={{appKey}}&appkey={{appKey}}&bili_local_id={{device_id}}&build=7720200&buvid={{buvid}}&channel=yingyongbao&containerName=AbstractWebActivity&csrf={{csrf}}&device=phone&deviceId=f9abaee74692f9e9&deviceName=samsungNexus&devicePlatform=Android10samsungNexus&device_id={{device_id}}&device_name=samsungNexus&device_platform=Android10samsungNexus&disable_rcmd=0&fingerprint={{device_id}}&isPad=false&localFingerprint={{device_id}}&local_id={{buvid}}&mobi_app=android&modelName=Nexus&networkState=2&networkstate=2&osVer=10&platform=android&sessionID=029d1ab7&statistics={"appId":1,"platform":3,"version":"7.72.0","abtest":""}&statusBarHeight=77&ts=1735731151&sign=1bb77731bc5b2b6948da2c7361fabb26 | ||
body: none | ||
auth: none | ||
} | ||
|
||
params:query { | ||
access_key: {{access_key}} | ||
appKey: {{appKey}} | ||
appkey: {{appKey}} | ||
bili_local_id: {{device_id}} | ||
build: 7720200 | ||
buvid: {{buvid}} | ||
channel: yingyongbao | ||
containerName: AbstractWebActivity | ||
csrf: {{csrf}} | ||
device: phone | ||
deviceId: f9abaee74692f9e9 | ||
deviceName: samsungNexus | ||
devicePlatform: Android10samsungNexus | ||
device_id: {{device_id}} | ||
device_name: samsungNexus | ||
device_platform: Android10samsungNexus | ||
disable_rcmd: 0 | ||
fingerprint: {{device_id}} | ||
isPad: false | ||
localFingerprint: {{device_id}} | ||
local_id: {{buvid}} | ||
mobi_app: android | ||
modelName: Nexus | ||
networkState: 2 | ||
networkstate: 2 | ||
osVer: 10 | ||
platform: android | ||
sessionID: 029d1ab7 | ||
statistics: {"appId":1,"platform":3,"version":"7.72.0","abtest":""} | ||
statusBarHeight: 77 | ||
ts: 1735731151 | ||
sign: 1bb77731bc5b2b6948da2c7361fabb26 | ||
} | ||
|
||
headers { | ||
Host: api.bilibili.com | ||
Cookie: {{cookieStr}} | ||
native_api_from: h5 | ||
buvid: {{buvid}} | ||
accept: application/json, text/plain, */* | ||
referer: https://big.bilibili.com/mobile/bigPoint/task | ||
content-type: application/json | ||
user-agent: {{user-agent}} | ||
x-bili-trace-id: be9823849864b71718b2fd385b677527:18b2fd385b677527:0:0 | ||
x-bili-aurora-eid: UlAAQFkMBVkH | ||
x-bili-mid: {{mid}} | ||
x-bili-aurora-zone: | ||
x-bili-gaia-vtoken: | ||
x-bili-ticket: eyJhbGciOiJIUzI1NiIsImtpZCI6InMwMyIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MzU3NTk1NTIsImlhdCI6MTczNTczMDQ1MiwiYnV2aWQiOiJYVzcyNEQxNzI0Njg3MTlDQzI1NjA1REIyNDI0NzhEMkUxMjE5In0.wg0stqcv1_NO4GwHuC70gzuk-O_ROX5bJJoCKfa5EdA | ||
bili-http-engine: cronet | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
meta { | ||
name: app.bilibili.com | ||
} | ||
|
||
script:pre-request { | ||
const CryptoJS = require('crypto-js'); | ||
|
||
console.log("start"); | ||
|
||
const md5 = (str) => CryptoJS.MD5(str).toString(CryptoJS.enc.Hex); | ||
|
||
const replacePlaceholders = (body) => { | ||
for (const key in body) { | ||
if (typeof body[key] === 'string') { | ||
// Check if value contains {{}} placeholders | ||
const matches = body[key].match(/{{(.*?)}}/g); | ||
if (matches) { | ||
matches.forEach(match => { | ||
const placeholder = match.slice(2, -2); // Remove the {{ and }} | ||
const value = bru.getEnvVar(placeholder); | ||
body[key] = body[key].replace(match, value); | ||
}); | ||
} | ||
} | ||
} | ||
}; | ||
|
||
function appSign(params, appkey, appsec) { | ||
params.appkey = appkey; | ||
delete body.sign; | ||
const sortedKeys = Object.keys(params).sort(); | ||
const sortedParams = sortedKeys.map(key => `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`).join('&'); | ||
console.log(sortedParams); | ||
return md5(sortedParams + appsec); | ||
} | ||
|
||
const body = req.getBody(); | ||
|
||
if (body && body.hasOwnProperty('sign')) { | ||
replacePlaceholders(body); | ||
const sign = appSign(body, bru.getEnvVar("appKey"), bru.getEnvVar("appSec")); | ||
console.log("calculate sign:" + sign); | ||
|
||
body.sign = sign; | ||
} | ||
|
||
req.setBody(body); | ||
} |
96 changes: 96 additions & 0 deletions
96
bruno/app.bilibili.com/pgc/activity/deliver/material/receive.bru
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
meta { | ||
name: receive | ||
type: http | ||
seq: 1 | ||
} | ||
|
||
post { | ||
url: https://app.bilibili.com/pgc/activity/deliver/material/receive | ||
body: formUrlEncoded | ||
auth: none | ||
} | ||
|
||
headers { | ||
Host: api.bilibili.com | ||
buvid: {{buvid}} | ||
fp_local: {{device_id}} | ||
fp_remote: {{device_id}} | ||
session_id: e04d2e05 | ||
env: prod | ||
app-key: android64 | ||
user-agent: {{user-agent}} | ||
x-bili-trace-id: 0564afa825e0e1ec59164fe59367755a:59164fe59367755a:0:0 | ||
x-bili-aurora-eid: UlAAQFkMBVkH | ||
x-bili-mid: {{mid}} | ||
x-bili-aurora-zone: | ||
x-bili-gaia-vtoken: | ||
x-bili-ticket: eyJhbGciOiJIUzI1NiIsImtpZCI6InMwMyIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MzU3NzI2NDcsImlhdCI6MTczNTc0MzU0NywiYnV2aWQiOiJYVzcyNEQxNzI0Njg3MTlDQzI1NjA1REIyNDI0NzhEMkUxMjE5In0.eafhpooLoe2q6cA45_Xrgq1VO-y490pxP5gwJ4qm_ik | ||
bili-http-engine: cronet | ||
Cookie: {{cookieStr}} | ||
} | ||
|
||
body:form-urlencoded { | ||
activity_code: | ||
appkey: {{appKey}} | ||
build: 7720200 | ||
c_locale: zh_CN | ||
channel: yingyongbao | ||
disable_rcmd: 0 | ||
ep_id: 328482 | ||
from_spmid: united.player-video-detail.player.continue | ||
mobi_app: android | ||
platform: android | ||
s_locale: zh_CN | ||
season_id: 12548 | ||
spmid: united.player-video-detail.0.0 | ||
statistics: {"appId":1,"platform":3,"version":"7.72.0","abtest":""} | ||
ts: 1736179521 | ||
sign: 132d2532467ef649a925aece247cdb4b | ||
access_key: {{access_key}} | ||
} | ||
|
||
docs { | ||
终端:APP | ||
|
||
作用:开始大会员赚大积分任务-观看剧集内容 | ||
|
||
入口: | ||
- 我的->会员中心->赚大积分->查看8项任务,点击“观看剧集内容”,选择视频后触发 | ||
|
||
传入剧集的id,会返回task_id和token,用于标识该次观看任务 | ||
|
||
该sample的视频为《让子弹飞》 | ||
|
||
完整的观看剧集内容任务调用接口如下: | ||
|
||
- 领取:app.bilibili.com/pgc/activity/score/task/receive/v2 | ||
- 开始:app.bilibili.com/pgc/activity/deliver/material/receive | ||
- 上报完成:app.bilibili.com/pgc/activity/deliver/task/complete | ||
|
||
Response Sample: | ||
|
||
```json | ||
{ | ||
"code": 0, | ||
"data": { | ||
"closeType": "close_win", | ||
"container": [], | ||
"showTime": "", | ||
"watch_count_down_cfg": { | ||
"action": "url", | ||
"closeType": "close_win", | ||
"complete_status_desc": "大积分已到账", | ||
"complete_status_jump_url": "https://big.bilibili.com/mobile/bigPoint?navhide=1&closable=1", | ||
"count_down_status_desc": "看${time}获大积分", | ||
"login": true, | ||
"milliseconds": 600000, | ||
"pause_status_desc": "计时暂停", | ||
"showTime": "ENTER", | ||
"task_id": "4320003", | ||
"token": "67ba5888e7" | ||
} | ||
}, | ||
"message": "success" | ||
} | ||
``` | ||
} |
70 changes: 70 additions & 0 deletions
70
bruno/app.bilibili.com/pgc/activity/deliver/task/complete.bru
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
meta { | ||
name: complete | ||
type: http | ||
seq: 1 | ||
} | ||
|
||
post { | ||
url: https://app.bilibili.com/pgc/activity/deliver/task/complete | ||
body: formUrlEncoded | ||
auth: none | ||
} | ||
|
||
headers { | ||
Host: api.bilibili.com | ||
buvid: {{buvid}} | ||
fp_local: {{device_id}} | ||
fp_remote: {{device_id}} | ||
session_id: e04d2e05 | ||
env: prod | ||
app-key: android64 | ||
user-agent: {{user-agent}} | ||
x-bili-trace-id: a301946d9621645a707b40973f67755c:707b40973f67755c:0:0 | ||
x-bili-aurora-eid: UlAAQFkMBVkH | ||
x-bili-mid: {{mid}} | ||
x-bili-aurora-zone: | ||
x-bili-gaia-vtoken: | ||
x-bili-ticket: eyJhbGciOiJIUzI1NiIsImtpZCI6InMwMyIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MzU3NzI2NDcsImlhdCI6MTczNTc0MzU0NywiYnV2aWQiOiJYVzcyNEQxNzI0Njg3MTlDQzI1NjA1REIyNDI0NzhEMkUxMjE5In0.eafhpooLoe2q6cA45_Xrgq1VO-y490pxP5gwJ4qm_ik | ||
bili-http-engine: cronet | ||
Cookie: {{cookieStr}} | ||
} | ||
|
||
body:form-urlencoded { | ||
build: 7720200 | ||
c_locale: zh_CN | ||
channel: yingyongbao | ||
disable_rcmd: 0 | ||
mobi_app: android | ||
platform: android | ||
s_locale: zh_CN | ||
statistics: {"appId":1,"platform":3,"version":"7.72.0","abtest":""} | ||
task_id: 4320003 | ||
token: abe88f72be | ||
access_key: {{access_key}} | ||
timestamp: 1735744760834 | ||
ts: 1735744760 | ||
sign: 2292d647d9b3f6dbd2f99b5a90cbddaf | ||
appkey: {{appKey}} | ||
task_sign: 93a1c64da4c02c31ca7575c08212e08f | ||
} | ||
|
||
docs { | ||
终端:APP | ||
|
||
作用:上报完成大会员赚大积分任务-观看剧集内容 | ||
|
||
入口: | ||
- 我的->会员中心->赚大积分->查看8项任务,点击“观看剧集内容”,挑选视频,观看10分钟后,自动触发 | ||
|
||
传入剧集的id,会返回task_id和token,用于标识该次观看任务 | ||
|
||
task_sign必传,与sign的生成方式相同。即,先排除掉task_sign和sign,生成签名后赋值给task_sign,然后在签名一次得到sign | ||
|
||
且只能调用成功一次,第二次及之后会返回400 | ||
|
||
完整的观看剧集内容任务调用接口如下: | ||
|
||
- 领取:app.bilibili.com/pgc/activity/score/task/receive/v2 | ||
- 开始:app.bilibili.com/pgc/activity/deliver/material/receive | ||
- 上报完成:app.bilibili.com/pgc/activity/deliver/task/complete | ||
} |
Oops, something went wrong.