review choices before submitting

This commit is contained in:
2021-06-02 20:02:25 +02:00
parent 5d3c2a4909
commit 8e50b13ee6

11
c.py
View File

@@ -105,9 +105,16 @@ if __name__ == "__main__":
print("------------") print("------------")
for datetime, classes in datetimes: for datetime, classes in datetimes:
choices.append(ask_date(datetime, buffer)) choices.append((datetime, ask_date(datetime, buffer)))
print("Here are your choices:")
for datetime, choice in choices:
print(f"{datetime}: {MAPPING[choice]}")
print("-----------")
if input("Do you want to submit? (Y/n) ").lower() in ("y", ""): if input("Do you want to submit? (Y/n) ").lower() in ("y", ""):
submit_choices(args.url, choices=choices, name=args.name, token=get_control_token(soup)) submit_choices(args.url, choices=[x for _,x in choices], name=args.name, token=get_control_token(soup))
print("submitted") print("submitted")