start
This commit is contained in:
parent
bab630934c
commit
f3f45d25f9
|
@ -26,7 +26,7 @@ def format_datetime(value, format="%d %B %Y, %H:%M:%S"):
|
||||||
date = datetime.fromisoformat(value)
|
date = datetime.fromisoformat(value)
|
||||||
return date.strftime(format)
|
return date.strftime(format)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return date
|
return value
|
||||||
|
|
||||||
|
|
||||||
statuses = {
|
statuses = {
|
||||||
|
@ -180,9 +180,9 @@ async def deal_tab(
|
||||||
task_data_json = task_data.json()
|
task_data_json = task_data.json()
|
||||||
result = task_data_json["result"]["tasks"]
|
result = task_data_json["result"]["tasks"]
|
||||||
|
|
||||||
while len(task_data_json["result"]["tasks"]) == 50 or len(result) > 50*4:
|
while len(task_data_json["result"]["tasks"]) == 50 and len(result) < 50*4:
|
||||||
limit = ((len(result)//50) + 1) * 50
|
limit = (len(result)//50) * 50
|
||||||
task_data = requests.get(get_task_hook + f"limit={limit}")
|
task_data = requests.get(get_task_hook + f"&start={limit}")
|
||||||
task_data_json = task_data.json()
|
task_data_json = task_data.json()
|
||||||
result += task_data_json["result"]["tasks"]
|
result += task_data_json["result"]["tasks"]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue