mirror of
https://github.com/shanmiteko/LotteryAutoScript.git
synced 2026-06-04 21:01:17 +08:00
parent
c8e1a328ec
commit
58edd4129c
@ -919,24 +919,30 @@ const bili_client = {
|
|||||||
* @return {boolean} isError true
|
* @return {boolean} isError true
|
||||||
*/
|
*/
|
||||||
async shareVideo(uid, aid) {
|
async shareVideo(uid, aid) {
|
||||||
const responseText = await post({
|
const
|
||||||
url: API.DYNAMIC_REPOST_SHARE,
|
responseText = await post({
|
||||||
contents: {
|
url: API.DYNAMIC_REPOST_SHARE,
|
||||||
platform: "pc",
|
contents: {
|
||||||
uid,
|
platform: "pc",
|
||||||
type: 8,
|
uid,
|
||||||
content: "分享视频",
|
type: 8,
|
||||||
repost_code: 20000,
|
content: "分享视频",
|
||||||
rid: aid,
|
repost_code: 20000,
|
||||||
csrf_token: GlobalVar.get("csrf")
|
rid: aid,
|
||||||
}
|
csrf_token: GlobalVar.get("csrf")
|
||||||
});
|
}
|
||||||
if (/^{"code":0/.test(responseText)) {
|
}),
|
||||||
log.info('转发视频', `成功转发视频(av${aid})`);
|
res = strToJson(responseText);
|
||||||
return false
|
switch (res.code) {
|
||||||
} else {
|
case 0:
|
||||||
log.error('转发视频', `转发失败\n${responseText}`);
|
log.info('转发视频', `成功转发视频(av${aid})`);
|
||||||
return true
|
return false
|
||||||
|
case 1101015:
|
||||||
|
log.warn('转发视频', `该动态不能转发分享(av${aid})`);
|
||||||
|
return false
|
||||||
|
default:
|
||||||
|
log.error('转发视频', `转发失败\n${responseText}`);
|
||||||
|
return true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user