Adjuted to API changes

Signed-off-by: fly <merspieler@airmail.cc>
This commit is contained in:
fly 2021-04-16 22:47:31 +00:00
parent 66d65ba7b9
commit 387f4fc521

View file

@ -187,7 +187,7 @@ def api_get_job(action, api, token, none_exit=True):
ret = api_get_job(action, api, token, none_exit)
return ret
else:
response = requests.post(api, data={'auth': token, 'action': 'get-job', 'additional-type': action}, headers={"lAccept": "application/json", "Content-Type": "application/x-www-form-urlencoded"})
response = requests.post(api, data={'auth': token, 'action': 'get-job', 'type': action}, headers={"lAccept": "application/json", "Content-Type": "application/x-www-form-urlencoded"})
if response.ok and response.json()["success"] == True:
match = re.match(r"[ew]\d{3}[ns]\d{2}|[0-9]{1,7}|None", str(response.json()["job"]))
if match != None: