zhangyong 9 maanden geleden
bovenliggende
commit
72ae49dc1f

+ 2 - 2
jingdianfuqiwang/jingdianfuqiwang_recommend/jingdianfuqiwang_recommend_scheduling.py

@@ -123,7 +123,7 @@ class TFuQiWangRecommend(object):
         item.add_video_info("strategy", self.mode)
         item.add_video_info("strategy", self.mode)
         item.add_video_info("session", "{}-{}".format(self.platform, int(time.time())))
         item.add_video_info("session", "{}-{}".format(self.platform, int(time.time())))
         mq_obj = item.produce_item()
         mq_obj = item.produce_item()
-        value = get_data(self.platform, video_obj.get("vid", ""))
+        value = get_data(self.platform, video_obj["nid"])
         if int(value) == 1:
         if int(value) == 1:
             AliyunLogger.logging(
             AliyunLogger.logging(
                 code="2004",
                 code="2004",
@@ -142,7 +142,7 @@ class TFuQiWangRecommend(object):
         if pipeline.process_item():
         if pipeline.process_item():
             self.download_cnt += 1
             self.download_cnt += 1
             self.mq.send_msg(mq_obj)
             self.mq.send_msg(mq_obj)
-            store_data(self.platform, video_obj.get("vid", ""), False, 12)
+            store_data(self.platform, video_obj["nid"], False, 12)
             time.sleep(60 * random.randint(1, 5))
             time.sleep(60 * random.randint(1, 5))
             AliyunLogger.logging(
             AliyunLogger.logging(
                 code="1002",
                 code="1002",