$pn, 'ps' => $ps, 'stime' => date("Y-m-d H:i:s", strtotime(date("Y-m-d", time()))), 'etime' => date("Y-m-d H:i:s", strtotime(date("Y-m-d", time())) + 86400 - 1) ]; $headers = [ 'origin' => 'https://www.bilibili.com', 'referer' => 'https://www.bilibili.com/v/game/match/competition', ]; return Request::getjSON(true, 'pc', $url, $payload, $headers); } /** * 竞猜 * @param int $oid * @param int $main_id * @param int $detail_id * @param int $count * @return array */ public static function guessAdd(int $oid, int $main_id, int $detail_id, int $count): array { $user = User::parseCookie(); // $url = 'https://api.bilibili.com/x/esports/guess/add'; $payload = [ 'oid' => $oid, 'main_id' => $main_id, 'detail_id' => $detail_id, 'count' => $count, 'is_fav' => 0, 'csrf' => $user['csrf'], 'csrf_token' => $user['csrf'], ]; $headers = [ 'origin' => 'https://www.bilibili.com', 'referer' => 'https://www.bilibili.com/v/game/match/competition' ]; return Request::postJson(true, 'pc', $url, $payload, $headers); } }