From e9fbf09a3585f68f7a010791d7ea356d81ba5de9 Mon Sep 17 00:00:00 2001 From: docjyJ Date: Wed, 2 Sep 2020 16:00:42 +0200 Subject: [PATCH] Update api --- .gitignore | 2 +- washinsa/washinsa_handler.py | 19 ++++++------------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index cb99706..5d57a56 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ /facebook/token /washinsa/washinsa_data.json -/washinsa/washinsa_data_V2.json +/washinsa/tripode_b_data.json /facebook/facebook_data.json /dashboard/dashboard_data.json /menu/menu_data.json diff --git a/washinsa/washinsa_handler.py b/washinsa/washinsa_handler.py index 1ed6ef4..203ffce 100644 --- a/washinsa/washinsa_handler.py +++ b/washinsa/washinsa_handler.py @@ -21,8 +21,8 @@ Each machine row is composed of 6 columns - 6 - End time (The end time in format HH:MM or empty) ''' -DUMP_FILE = "washinsa_data.json" -DUMP_FILE_V2 = "washinsa_data_V2.json" +DUMP_FILE_INSA = "washinsa_data.json" +DUMP_FILE_TRIPODE_B = "tripode_b_data.json" WASHINSA_URL = "https://www.proxiwash.com/weblaverie/component/weblaverie/?view=instancesfiche&format=raw&s=" DRYER_STRING = "SECHE LINGE" @@ -213,17 +213,10 @@ def get_parsed_data(rows): def main(): - insa = get_json("cf4f39") - with open(DUMP_FILE, 'w') as f: - json.dump(insa, f) - - tripodeB = get_json("b310b7") - washs = { - "insa": insa, - "tripodeB": tripodeB, - } - with open(DUMP_FILE_V2, 'w') as f: - json.dump(washs, f) + with open(DUMP_FILE_INSA, 'w') as f: + json.dump(get_json("cf4f39"), f) + with open(DUMP_FILE_TRIPODE_B, 'w') as f: + json.dump(get_json("b310b7"), f) main()