瀏覽代碼

更新 'monitor/GA_Daily.py'

miacheng913 3 年之前
父節點
當前提交
c8376872a7
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      monitor/GA_Daily.py

+ 3 - 1
monitor/GA_Daily.py

@@ -142,7 +142,9 @@ def main():
   result=[]
   for elmt in ga_dict:
       print(elmt)
-      send_msg(elmt['ga:pageviews'])
+      hour = datetime.now().strftime('%H')
+      if int(hour)+1 > 8 :
+      	send_msg(elmt['ga:pageviews'])
 #      result.append(elmt)
   print('inserting.....')