mirror of
https://github.com/lkeme/BiliHelper-personal.git
synced 2025-12-19 09:30:10 +08:00
[fix] endless loop
This commit is contained in:
parent
2525c26809
commit
2a9e956586
@ -74,7 +74,13 @@ class DailyGold extends BasePlugin
|
||||
break;
|
||||
case 0:
|
||||
// 领取ing
|
||||
$this->userTaskReceiveRewards($up_uid);
|
||||
if (!$this->userTaskReceiveRewards($up_uid)) {
|
||||
// 领取失败 TODO
|
||||
// [code] => 27000002
|
||||
// [message] => 领取失败,请重试
|
||||
// [data][num] => 0
|
||||
TimeLock::setTimes(10 * 60);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
// 默认一次弹幕进度
|
||||
|
||||
@ -106,7 +106,10 @@ class VipPoint extends BasePlugin
|
||||
$this->initTask();
|
||||
//
|
||||
$this->receiveTask();
|
||||
|
||||
// 全部完成
|
||||
if (TimeLock::getTimes() <= time()) {
|
||||
TimeLock::setTimes(TimeLock::timing(9));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -132,9 +135,6 @@ class VipPoint extends BasePlugin
|
||||
// 每次执行一个任务
|
||||
return;
|
||||
}
|
||||
// 全部完成
|
||||
TimeLock::setTimes(TimeLock::timing(9));
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -30,13 +30,6 @@ class ApiTask
|
||||
'Referer' => 'https://big.bilibili.com/mobile/bigPoint/task'
|
||||
];
|
||||
|
||||
/**
|
||||
* @var array|string[]
|
||||
*/
|
||||
protected static array $payload = [
|
||||
'statistics' => '{"appId":1,"platform":3,"version":"7.14.1","abtest":""}',
|
||||
];
|
||||
|
||||
/**
|
||||
* 完成任务 jp:追番页浏览 tv: 影视页浏览
|
||||
* @param string $position
|
||||
@ -48,11 +41,14 @@ class ApiTask
|
||||
$user = User::parseCookie();
|
||||
//
|
||||
$url = 'https://api.bilibili.com/pgc/activity/deliver/task/complete';
|
||||
$payload = array_merge([
|
||||
//
|
||||
$payload = [
|
||||
'disable_rcmd' => '0',
|
||||
'position' => $position,
|
||||
'csrf' => $user['csrf'],
|
||||
], self::$payload);
|
||||
'statistics' => getDevice('app.bili_a.statistics'),
|
||||
];
|
||||
//
|
||||
$headers = array_merge([], self::$headers);
|
||||
return Request::postJson(true, 'app', $url, Sign::common($payload), $headers);
|
||||
}
|
||||
|
||||
@ -30,13 +30,6 @@ class ApiTask
|
||||
'Referer' => 'https://big.bilibili.com/mobile/bigPoint/task'
|
||||
];
|
||||
|
||||
/**
|
||||
* @var array|string[]
|
||||
*/
|
||||
protected static array $payload = [
|
||||
'statistics' => '{"appId":1,"platform":3,"version":"7.14.1","abtest":""}',
|
||||
];
|
||||
|
||||
/**
|
||||
* 大会员签到
|
||||
* @return array
|
||||
@ -47,10 +40,13 @@ class ApiTask
|
||||
$user = User::parseCookie();
|
||||
//
|
||||
$url = 'https://api.bilibili.com/pgc/activity/score/task/sign';
|
||||
$payload = array_merge([
|
||||
//
|
||||
$payload = [
|
||||
'disable_rcmd' => '0',
|
||||
'csrf' => $user['csrf'],
|
||||
], self::$payload);
|
||||
'statistics' => getDevice('app.bili_a.statistics'),
|
||||
];
|
||||
//
|
||||
$headers = array_merge([], self::$headers);
|
||||
return Request::postJson(true, 'app', $url, Sign::common($payload), $headers);
|
||||
}
|
||||
|
||||
@ -56,12 +56,6 @@ class ApiLogin
|
||||
public static function sendSms(array $payload): string
|
||||
{
|
||||
$url = 'https://passport.bilibili.com//x/passport-login/sms/send';
|
||||
// TODO 动态版本参数
|
||||
// $payload = [
|
||||
// 'cid' => $cid,
|
||||
// 'tel' => $phone,
|
||||
// 'statistics' => '{"appId":1,"platform":3,"version":"7.14.1","abtest":""}',
|
||||
// ];
|
||||
// {"code":0,"message":"0","ttl":1,"data":{"is_new":false,"captcha_key":"4e292933816755442c1568e2043b8e41","recaptcha_url":""}}
|
||||
// {"code":0,"message":"0","ttl":1,"data":{"is_new":false,"captcha_key":"","recaptcha_url":"https://www.bilibili.com/h5/project-msg-auth/verify?ct=geetest\u0026recaptcha_token=ad520c3a4a3c46e29b1974d85efd2c4b\u0026gee_gt=1c0ea7c7d47d8126dda19ee3431a5f38\u0026gee_challenge=c772673050dce482b9f63ff45b681ceb\u0026hash=ea2850a43cc6b4f1f7b925d601098e5e"}}
|
||||
return Request::post('app', $url, Sign::login($payload));
|
||||
|
||||
@ -31,13 +31,6 @@ class ApiEvent
|
||||
'Referer' => 'https://big.bilibili.com/mobile/bigPoint/task'
|
||||
];
|
||||
|
||||
/**
|
||||
* @var array|string[]
|
||||
*/
|
||||
protected static array $payload = [
|
||||
'statistics' => '{"appId":1,"platform":3,"version":"7.14.1","abtest":""}',
|
||||
];
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
@ -46,14 +39,16 @@ class ApiEvent
|
||||
//
|
||||
$user = User::parseCookie();
|
||||
//
|
||||
$params = array_merge([
|
||||
$params = [
|
||||
'csrf' => $user['csrf'],
|
||||
], self::$payload);
|
||||
'statistics' => getDevice('app.bili_a.statistics'),
|
||||
];
|
||||
$url = 'https://show.bilibili.com/api/activity/fire/common/event/dispatch?' . http_build_query(Sign::common($params));
|
||||
//
|
||||
$payload = [
|
||||
'eventId' => 'hevent_oy4b7h3epeb',
|
||||
];
|
||||
//
|
||||
$headers = array_merge([
|
||||
'content-type' => 'application/json; charset=utf-8',
|
||||
], self::$headers);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user