Browse Source

匹配过程中,取消illegal字段

luojunhui 3 months ago
parent
commit
181174a54d
2 changed files with 2 additions and 5 deletions
  1. 0 1
      tasks/new_contentId_task.py
  2. 2 4
      tasks/utils/spider_task.py

+ 0 - 1
tasks/new_contentId_task.py

@@ -49,7 +49,6 @@ class NewContentIdTask(object):
                 SELECT content_id, count(1) as cnt
                 FROM {self.article_crawler_video_table}
                 WHERE download_status = {NewContentIdTaskConst.VIDEO_DOWNLOAD_SUCCESS_STATUS}
-                --  AND is_illegal = {NewContentIdTaskConst.VIDEO_SAFE}
                 GROUP BY content_id
             ) t2
             ON t1.content_id = t2.content_id

+ 2 - 4
tasks/utils/spider_task.py

@@ -19,7 +19,6 @@ async def whether_downloaded_videos_exists(content_id, article_crawler_video_tab
     FROM {article_crawler_video_table}
     WHERE content_id = '{content_id}' 
         AND download_status = {new_content_id_task_const.VIDEO_DOWNLOAD_SUCCESS_STATUS};
-    --   AND is_illegal = {new_content_id_task_const.VIDEO_SAFE};
     """
     res_tuple = await db_client.async_select(sql)
     if len(res_tuple) >= new_content_id_task_const.MIN_MATCH_VIDEO_NUM:
@@ -38,7 +37,6 @@ async def get_downloaded_videos(content_id, article_crawler_video_table, db_clie
         FROM {article_crawler_video_table}
         WHERE content_id = '{content_id}' 
             AND download_status = {new_content_id_task_const.VIDEO_DOWNLOAD_SUCCESS_STATUS}
-            -- AND is_illegal = {new_content_id_task_const.VIDEO_SAFE}
         ORDER BY score DESC;
     """
 
@@ -65,8 +63,8 @@ async def update_crawler_table_with_exist_content_id(root_content_id, content_id
             duration, video_url, cover_url, download_status, video_oss_path, cover_oss_path, user_id, score, is_illegal
         FROM {article_crawler_video_table}
         WHERE content_id = '{root_content_id}' 
-            AND download_status = {new_content_id_task_const.VIDEO_DOWNLOAD_SUCCESS_STATUS};
-            -- AND is_illegal = {new_content_id_task_const.VIDEO_SAFE};
+            AND download_status = {new_content_id_task_const.VIDEO_DOWNLOAD_SUCCESS_STATUS}
+            AND is_illegal = {new_content_id_task_const.VIDEO_SAFE};
     """
     res_tuple = await db_client.async_select(select_sql)
     if res_tuple: