wangkun 1 سال پیش
والد
کامیت
d8d64ce198
2فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 1 1
      shipinhao/shipinhao_recommend/recommend_h5.py
  2. 2 2
      shipinhao/shipinhao_recommend/shipinhao_recommend.py

+ 1 - 1
shipinhao/shipinhao_recommend/recommend_h5.py

@@ -203,7 +203,7 @@ class RecommendH5:
                     video_dict["height"] = 0
                     video_dict["height"] = 0
                     video_dict["crawler_rule"] = json.dumps(rule_dict)
                     video_dict["crawler_rule"] = json.dumps(rule_dict)
                     video_dict["user_id"] = our_uid
                     video_dict["user_id"] = our_uid
-                    video_dict["publish_time"] = video_dict["publish_time_stamp"]
+                    video_dict["publish_time"] = video_dict["publish_time_str"]
                     mq.send_msg(video_dict)
                     mq.send_msg(video_dict)
                     Common.logger(log_type, crawler).info("已抓取到目标视频\n")
                     Common.logger(log_type, crawler).info("已抓取到目标视频\n")
                     Common.logging(log_type, crawler, env, "已抓取到目标视频\n")
                     Common.logging(log_type, crawler, env, "已抓取到目标视频\n")

+ 2 - 2
shipinhao/shipinhao_recommend/shipinhao_recommend.py

@@ -237,8 +237,8 @@ class ShipinhaoRecommend:
                 month_str = f"0{month_str}"
                 month_str = f"0{month_str}"
             if int(day_str) < 10:
             if int(day_str) < 10:
                 day_str = f"0{day_str}"
                 day_str = f"0{day_str}"
-            publish_time_str = f"{year_str}-{month_str}-{day_str}"
-        publish_time_stamp = int(time.mktime(time.strptime(publish_time_str, "%Y-%m-%d")))
+            publish_time_str = f"{year_str}-{month_str}-{day_str} 00:00:00"
+        publish_time_stamp = int(time.mktime(time.strptime(publish_time_str, "%Y-%m-%d %H:%M:%S")))
 
 
         # 收起评论
         # 收起评论
         driver.find_element(By.ID, "com.tencent.mm:id/be_").click()
         driver.find_element(By.ID, "com.tencent.mm:id/be_").click()