mirror of
https://github.com/QingdaoU/OpenVJ.git
synced 2024-12-28 15:31:48 +00:00
pat增加save方法和spj返回字段
This commit is contained in:
parent
24be9524eb
commit
ad0a988efb
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user