Browse Source

Update api

docjyJ 3 years ago
parent
commit
e9fbf09a35
2 changed files with 7 additions and 14 deletions
  1. 1
    1
      .gitignore
  2. 6
    13
      washinsa/washinsa_handler.py

+ 1
- 1
.gitignore View File

@@ -1,6 +1,6 @@
1 1
 /facebook/token
2 2
 /washinsa/washinsa_data.json
3
-/washinsa/washinsa_data_V2.json
3
+/washinsa/tripode_b_data.json
4 4
 /facebook/facebook_data.json
5 5
 /dashboard/dashboard_data.json
6 6
 /menu/menu_data.json

+ 6
- 13
washinsa/washinsa_handler.py View File

@@ -21,8 +21,8 @@ Each machine row is composed of 6 columns
21 21
  - 6 - End time (The end time in format HH:MM or empty)
22 22
 '''
23 23
 
24
-DUMP_FILE = "washinsa_data.json"
25
-DUMP_FILE_V2 = "washinsa_data_V2.json"
24
+DUMP_FILE_INSA = "washinsa_data.json"
25
+DUMP_FILE_TRIPODE_B = "tripode_b_data.json"
26 26
 WASHINSA_URL = "https://www.proxiwash.com/weblaverie/component/weblaverie/?view=instancesfiche&format=raw&s="
27 27
 DRYER_STRING = "SECHE LINGE"
28 28
 
@@ -213,17 +213,10 @@ def get_parsed_data(rows):
213 213
 
214 214
 
215 215
 def main():
216
-    insa = get_json("cf4f39")
217
-    with open(DUMP_FILE, 'w') as f:
218
-        json.dump(insa, f)
219
-
220
-    tripodeB = get_json("b310b7")
221
-    washs = {
222
-        "insa": insa,
223
-        "tripodeB": tripodeB,
224
-    }
225
-    with open(DUMP_FILE_V2, 'w') as f:
226
-        json.dump(washs, f)
216
+    with open(DUMP_FILE_INSA, 'w') as f:
217
+        json.dump(get_json("cf4f39"), f)
218
+    with open(DUMP_FILE_TRIPODE_B, 'w') as f:
219
+        json.dump(get_json("b310b7"), f)
227 220
 
228 221
 
229 222
 main()

Loading…
Cancel
Save