From ad0a988efbb011c5238508d2a087cca79f085680 Mon Sep 17 00:00:00 2001 From: virusdefender Date: Sun, 6 Mar 2016 19:01:32 +0800 Subject: [PATCH] =?UTF-8?q?pat=E5=A2=9E=E5=8A=A0save=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E5=92=8Cspj=E8=BF=94=E5=9B=9E=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- robots/pat.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/robots/pat.py b/robots/pat.py index e4b3d91..fe84101 100644 --- a/robots/pat.py +++ b/robots/pat.py @@ -6,9 +6,12 @@ from .utils import Language, Result class PATRobot(Robot): - def __init__(self, cookies=None): + def __init__(self, cookies=None, token=""): super().__init__(cookies=cookies) - self.token = "" + self.token = token + + def save(self): + return {"cookies": self.cookies, "token": self.token} def check_url(self, url): regex = r"^https://www.patest.cn/contests/pat-(a|b|t)-practise/1\d{3}$" @@ -61,6 +64,8 @@ class PATRobot(Robot): data["submit_url"] = "https://www.patest.cn" + data["submit_url"] # pat上都没有提示 data["hint"] = None + # pat没有spj + data["spj"] = False return data def _regex_page(self, url, regex):