""" 调用完成闯关 Parameters: state - 状态 cost_time - 耗时 """
def finish_game(state, cost_time): res = requests.get(finish_api % (state, cost_time), headers=request_header,verify=False) # err_code为0则成功 if res.json()["err_code"] == 0: print("状态成功") else: print(res.json()) print("请检查t的值是否合法")
if __name__ == '__main__': print("【羊了个羊一键闯关开始启动】") for i in range(cycle_count): print(f"...第{i + 1}开始完成闯关...") finish_game(1, 60) print(f"...第{i + 1}次完成闯关...") print("【羊了个羊一键闯关开始结束】")