|
@@ -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:
|