Spaces:
Running
Running
Update jihou.py
Browse files
jihou.py
CHANGED
|
@@ -81,7 +81,15 @@ def create_time_signal_body():
|
|
| 81 |
|
| 82 |
def load_todoufuken():
|
| 83 |
with open("todoufuken.json", encoding="utf-8") as f:
|
| 84 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
|
| 86 |
|
| 87 |
def fetch_weather(todoufuken):
|
|
|
|
| 81 |
|
| 82 |
def load_todoufuken():
|
| 83 |
with open("todoufuken.json", encoding="utf-8") as f:
|
| 84 |
+
lines = []
|
| 85 |
+
for line in f:
|
| 86 |
+
stripped = line.lstrip()
|
| 87 |
+
if stripped.startswith("//"):
|
| 88 |
+
continue
|
| 89 |
+
lines.append(line)
|
| 90 |
+
|
| 91 |
+
json_str = "".join(lines)
|
| 92 |
+
return json.loads(json_str)
|
| 93 |
|
| 94 |
|
| 95 |
def fetch_weather(todoufuken):
|