diva: fix start request

This commit is contained in:
Hay1tsme 2023-10-04 23:25:10 -04:00
parent 53c74c6511
commit f836b5dd21
3 changed files with 7 additions and 2 deletions

View File

@ -475,8 +475,8 @@ class DivaBase:
profile_dict.pop("version")
for k, v in profile_dict.items():
# if hasattr(resp, k):
setattr(resp, k, v)
if hasattr(resp, k):
setattr(resp, k, v)
response = "&ps_result=1"
# Contest progress

View File

@ -125,6 +125,8 @@ class BaseResponse:
def make(self) -> str:
ret = ""
for k, v in vars(self).items():
if type(v) == bool:
v = int(v)
ret += f"{k}={v}&"
if ret[-1] == "&":

View File

@ -106,6 +106,9 @@ class StartResponse(BaseResponse):
#self.cv_bv: str = "-1,-1,-1,-1"
self.cv_bv: str = "-1,-1,-1,-1"
self.cv_bf: str = "-1,-1,-1,-1"
self.cnp_cid=-1
self.cnp_val=-1
self.cnp_rr=-1
self.my_qst_id: str = ",".join(["-1"] * 25)
self.my_qst_sts: str = ",".join("0" * 5) + "," + ",".join(["-1"] * 20)
self.my_qst_prgrs: str = ",".join("0" * 5) + "," + ",".join(["-1"] * 20)