Browse Source

更新数据逻辑变更为:检测 2 天内的数据

wangkun 2 years ago
parent
commit
a45fae97b5
2 changed files with 4 additions and 3 deletions
  1. 2 1
      main/demo.py
  2. 2 2
      main/hour_list.py

+ 2 - 1
main/demo.py

@@ -96,4 +96,5 @@ class Demo:
 if __name__ == "__main__":
     demo = Demo()
     # demo.video_detail_info("44373353", "1161593420", "4572205769")
-    demo.times()
+    # demo.times()
+    print(1654744346-1654605576)

+ 2 - 2
main/hour_list.py

@@ -502,8 +502,8 @@ class HourList:
                             Common.logger().info("视频详情,当前播放量:{}", hour_play_cnt)
                             # 固定时间获取符合规则的视频,写入云文档:https://w42nne6hzg.feishu.cn/sheets/shtcngRPoDYAi24x52j2nDuHMih?sheet=ba0da4
                             update_hour = datetime.datetime.now()
-                            if int(time.time()) - v_time >= 259200:
-                                Common.logger().info("抓取时间超过 3 天")
+                            if int(time.time()) - v_time >= 172800:
+                                Common.logger().info("抓取时间超过 2 天")
                                 return
                             elif upload_data == today and update_hour.hour == 10 and int(upload_hour) <= 10:
                                 Common.logger().info("满足条件: 抓取日期为今天 and 当前时间:10点 and 抓取时间<=10点")