|
@@ -222,6 +222,19 @@ def parsing_js(resp):
|
|
|
def time_parsing_js(time_json, output):
|
|
|
weekday_text = []
|
|
|
periods = []
|
|
|
+ if time_json is None:
|
|
|
+ output['open_now'] = 'False'
|
|
|
+ output['periods'] = ''
|
|
|
+ output['weekday_text'] = ''
|
|
|
+ output['time_status'] = ''
|
|
|
+ return output
|
|
|
+ if time_json[1] is None:
|
|
|
+ output['open_now'] = 'False'
|
|
|
+ output['periods'] = ''
|
|
|
+ output['weekday_text'] = ''
|
|
|
+ output['time_status'] = ''
|
|
|
+ return output
|
|
|
+
|
|
|
|
|
|
for time_ in time_json[1]:
|
|
|
week = time_[0]
|
|
@@ -551,7 +564,7 @@ def main():
|
|
|
except:
|
|
|
r = redis.Redis(host='db.ptt.cx', port=6379, db=1,password='choozmo9')
|
|
|
msg=traceback.format_exc()
|
|
|
- r.set('webreq_error',msg)
|
|
|
+ r.set('google_error',msg)
|
|
|
|
|
|
|
|
|
# reivews
|