Forráskód Böngészése

最好的送你,愿你福气常在上线当日推荐流不去重操作;

罗俊辉 1 éve
szülő
commit
bc3e41396d
1 módosított fájl, 5 hozzáadás és 5 törlés
  1. 5 5
      application/pipeline/pipeline.py

+ 5 - 5
application/pipeline/pipeline.py

@@ -133,13 +133,13 @@ class PiaoQuanPipeline(object):
             return True
         if self.platform == "jixiangxingfu" and self.mode == "recommend":
             return True
+        if self.platform == "yuannifuqichangzai" and self.mode == "recommend":
+            return True
+        if self.platform == "zuihaodesongni" and self.mode == "recommend":
+            return True
         out_id = self.item["out_video_id"]
         # 判断加上标题去重
-        if self.mode == "recommend" and self.platform == "yuannifuqichangzai":
-            title = self.item["video_title"]
-            sql = f""" select 1 from crawler_video where platform = "{self.platform}" and out_video_id="{out_id}" and video_title="{title}"; """
-        # 判断加上标题去重
-        elif self.mode == "recommend" and self.platform == "zhufuhaoyunbaofu":
+        if self.mode == "recommend" and self.platform == "zhufuhaoyunbaofu":
             title = self.item["video_title"]
             sql = f""" select 1 from crawler_video where platform = "{self.platform}" and out_video_id="{out_id}" and video_title="{title}"; """
         else: