izuemon commited on
Commit
04a53c8
·
verified ·
1 Parent(s): 2f1b119

Update jihou.py

Browse files
Files changed (1) hide show
  1. jihou.py +9 -1
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
- return json.load(f)
 
 
 
 
 
 
 
 
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):