mirror of
https://github.com/lkeme/BiliHelper-personal.git
synced 2025-12-19 09:30:10 +08:00
[fix] CapsuleLottery
This commit is contained in:
parent
de8975da7b
commit
2ecf6aa348
2
DOC.md
2
DOC.md
@ -17,7 +17,7 @@ B 站直播实用脚本
|
|||||||
|--------------------|--------------------|--------------------|
|
|--------------------|--------------------|--------------------|
|
||||||
|Login |21.03.27 |账号登录 |
|
|Login |21.03.27 |账号登录 |
|
||||||
|Schedule |21.03.27 |休眠控制 |
|
|Schedule |21.03.27 |休眠控制 |
|
||||||
|MasterSite |21.03.27 |主站助手 |
|
|MainSite |21.03.27 |主站助手 |
|
||||||
|Daily |21.03.27 |每日礼包 |
|
|Daily |21.03.27 |每日礼包 |
|
||||||
|Heart |21.03.27 |双端心跳 |
|
|Heart |21.03.27 |双端心跳 |
|
||||||
|DailyTask |21.03.27 |每日任务 |
|
|DailyTask |21.03.27 |每日任务 |
|
||||||
|
|||||||
@ -54,6 +54,18 @@
|
|||||||
"draw_times": 2,
|
"draw_times": 2,
|
||||||
"expire_at": "2021-05-05 23:59:59"
|
"expire_at": "2021-05-05 23:59:59"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"url": "https://www.bilibili.com/blackboard/gaming_on_bilibili.html",
|
||||||
|
"title": "上B站看电竞",
|
||||||
|
"description": "活动期间每天分享页面,新增一次机会。",
|
||||||
|
"sid": "0b87bd83-8565-11eb-8597-246e966235d8",
|
||||||
|
"login": "true",
|
||||||
|
"follow": "false",
|
||||||
|
"share": "true",
|
||||||
|
"draw_times": 1,
|
||||||
|
"expire_at": "2021-04-30 23:59:59",
|
||||||
|
"remarks": "时间不名,暂定一个月。"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"url": "https://www.bilibili.com/blackboard/activity-YxhUEb7UwQ.html",
|
"url": "https://www.bilibili.com/blackboard/activity-YxhUEb7UwQ.html",
|
||||||
"title": "种草大作战特别篇",
|
"title": "种草大作战特别篇",
|
||||||
|
|||||||
@ -68,7 +68,7 @@ class App
|
|||||||
$plugins = [
|
$plugins = [
|
||||||
'Login',
|
'Login',
|
||||||
'Schedule',
|
'Schedule',
|
||||||
'MasterSite',
|
'MainSite',
|
||||||
'Daily',
|
'Daily',
|
||||||
'ManGa',
|
'ManGa',
|
||||||
'GameMatch',
|
'GameMatch',
|
||||||
|
|||||||
@ -222,7 +222,7 @@ class AnchorRaffle extends BaseRaffle
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
$results = Curl::async('app', $url, $tasks);
|
$results = Curl::async('app', $url, $tasks);
|
||||||
# print_r($results);
|
// print_r($results);
|
||||||
return $results;
|
return $results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -352,7 +352,7 @@ class CapsuleLottery
|
|||||||
Log::notice("开始抽奖#{$num} {$raw}");
|
Log::notice("开始抽奖#{$num} {$raw}");
|
||||||
// {"code":0,"message":"0","ttl":1,"data":{"status":false,"isEntity":false,"info":{"coin":1},"awards":[{"name":"谢谢参与","num":1,"text":"谢谢参与 X 1","web_url":"https://i0.hdslb.com/bfs/live/b0fccfb3bac2daae35d7e514a8f6d31530b9add2.png","mobile_url":"https://i0.hdslb.com/bfs/live/b0fccfb3bac2daae35d7e514a8f6d31530b9add2.png","usage":{"text":"很遗憾您未能中奖","url":""},"type":32,"expire":"当天","gift_type":"7290bc172e5ab9e151eb141749adb9dd","gift_value":""}],"text":["谢谢参与 X 1"],"isExCode":false}}
|
// {"code":0,"message":"0","ttl":1,"data":{"status":false,"isEntity":false,"info":{"coin":1},"awards":[{"name":"谢谢参与","num":1,"text":"谢谢参与 X 1","web_url":"https://i0.hdslb.com/bfs/live/b0fccfb3bac2daae35d7e514a8f6d31530b9add2.png","mobile_url":"https://i0.hdslb.com/bfs/live/b0fccfb3bac2daae35d7e514a8f6d31530b9add2.png","usage":{"text":"很遗憾您未能中奖","url":""},"type":32,"expire":"当天","gift_type":"7290bc172e5ab9e151eb141749adb9dd","gift_value":""}],"text":["谢谢参与 X 1"],"isExCode":false}}
|
||||||
if ($de_raw['code'] == 0) {
|
if ($de_raw['code'] == 0) {
|
||||||
$result = "活动->{$referer} 获得->{$de_raw['text'][0]}";
|
$result = "活动->{$referer} 获得->{$de_raw['data']['text'][0]}";
|
||||||
Notice::push('capsule_lottery', $result);
|
Notice::push('capsule_lottery', $result);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -98,7 +98,7 @@ class GiftRaffle extends BaseRaffle
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
$results = Curl::async('app', $url, $tasks);
|
$results = Curl::async('app', $url, $tasks);
|
||||||
# print_r($results);
|
// print_r($results);
|
||||||
return $results;
|
return $results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -113,7 +113,7 @@ class GuardRaffle extends BaseRaffle
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
$results = Curl::async('app', $url, $tasks);
|
$results = Curl::async('app', $url, $tasks);
|
||||||
# print_r($results);
|
// print_r($results);
|
||||||
return $results;
|
return $results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -211,7 +211,7 @@ class Login
|
|||||||
} else {
|
} else {
|
||||||
Log::info('公钥载入完毕');
|
Log::info('公钥载入完毕');
|
||||||
}
|
}
|
||||||
print_r($data);
|
// print_r($data);
|
||||||
$public_key = $data['data']['key'];
|
$public_key = $data['data']['key'];
|
||||||
$hash = $data['data']['hash'];
|
$hash = $data['data']['hash'];
|
||||||
openssl_public_encrypt($hash . $plaintext, $crypt, $public_key);
|
openssl_public_encrypt($hash . $plaintext, $crypt, $public_key);
|
||||||
|
|||||||
@ -14,13 +14,13 @@ use BiliHelper\Core\Log;
|
|||||||
use BiliHelper\Core\Curl;
|
use BiliHelper\Core\Curl;
|
||||||
use BiliHelper\Util\TimeLock;
|
use BiliHelper\Util\TimeLock;
|
||||||
|
|
||||||
class MasterSite
|
class MainSite
|
||||||
{
|
{
|
||||||
use TimeLock;
|
use TimeLock;
|
||||||
|
|
||||||
public static function run()
|
public static function run()
|
||||||
{
|
{
|
||||||
if (self::getLock() > time() || getenv('USE_MASTER_SITE') == 'false') {
|
if (self::getLock() > time() || getenv('USE_MAIN_SITE') == 'false') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (self::watchAid() && self::shareAid() && self::coinAdd()) {
|
if (self::watchAid() && self::shareAid() && self::coinAdd()) {
|
||||||
@ -96,7 +96,7 @@ class PkRaffle extends BaseRaffle
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
$results = Curl::async('app', $url, $tasks);
|
$results = Curl::async('app', $url, $tasks);
|
||||||
# print_r($results);
|
// print_r($results);
|
||||||
return $results;
|
return $results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@ class Schedule
|
|||||||
private static $unlock_timers = [];
|
private static $unlock_timers = [];
|
||||||
private static $sleep_section = [];
|
private static $sleep_section = [];
|
||||||
// 日常类
|
// 日常类
|
||||||
private static $fillable = ['Login', 'Schedule', 'Daily', 'Judge', 'MasterSite', 'GiftSend', 'DailyTask', 'Silver2Coin', 'ManGa', 'GameMatch', 'GroupSignIn', 'AwardRecord', 'Statistics'];
|
private static $fillable = ['Login', 'Schedule', 'Daily', 'Judge', 'MainSite', 'GiftSend', 'DailyTask', 'Silver2Coin', 'ManGa', 'GameMatch', 'GroupSignIn', 'AwardRecord', 'Statistics'];
|
||||||
// 任务类
|
// 任务类
|
||||||
private static $guarded_first = ['Barrage', 'GiftHeart', 'Silver', 'MaterialObject'];
|
private static $guarded_first = ['Barrage', 'GiftHeart', 'Silver', 'MaterialObject'];
|
||||||
// 监控类
|
// 监控类
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user