modify scripts
This commit is contained in:
@ -286,7 +286,7 @@ def fetch_performers_detail():
|
||||
# 获取新演员的列表
|
||||
while True:
|
||||
if force: # 从头逐个遍历
|
||||
perfomers_list = db_tools.query_performer_hrefs(start_id=last_perfomer_id, order_by='id asc', limit=limit_count)
|
||||
perfomers_list = db_tools.query_performer_hrefs(start_id=last_perfomer_id, before_updated_at='2025-04-01 00:00:00', order_by='id asc', limit=limit_count)
|
||||
else: # 只做更新
|
||||
perfomers_list = db_tools.query_performer_hrefs(is_full_data=0, limit=limit_count)
|
||||
if len(perfomers_list) < 1:
|
||||
@ -315,7 +315,7 @@ def fetch_movies_detail():
|
||||
last_movie_id = 0
|
||||
while True:
|
||||
if force: # 从头逐个遍历
|
||||
movies_list = db_tools.query_movie_hrefs(start_id=last_movie_id, order_by='id asc', limit=limit_count)
|
||||
movies_list = db_tools.query_movie_hrefs(start_id=last_movie_id, before_updated_at='2025-04-01 00:00:00', order_by='id asc', limit=limit_count)
|
||||
else: # 只做更新
|
||||
movies_list = db_tools.query_movie_hrefs(is_full_data=0, limit=limit_count)
|
||||
if len(movies_list) < 1:
|
||||
|
||||
@ -344,6 +344,12 @@ def query_performer_hrefs(**filters):
|
||||
if "is_full_data" in filters:
|
||||
sql += " AND is_full_data = ?"
|
||||
params.append(filters["is_full_data"])
|
||||
if "before_updated_at" in filters:
|
||||
sql += " AND updated_at <= ?"
|
||||
params.append(filters["before_updated_at"])
|
||||
if "after_updated_at" in filters:
|
||||
sql += " AND updated_at >= ?"
|
||||
params.append(filters["after_updated_at"])
|
||||
if "start_id" in filters:
|
||||
sql += " AND id > ?"
|
||||
params.append(filters["start_id"])
|
||||
@ -754,6 +760,12 @@ def query_movie_hrefs(**filters):
|
||||
if "is_full_data" in filters:
|
||||
sql += " AND is_full_data = ?"
|
||||
params.append(filters["is_full_data"])
|
||||
if "before_updated_at" in filters:
|
||||
sql += " AND updated_at <= ?"
|
||||
params.append(filters["before_updated_at"])
|
||||
if "after_updated_at" in filters:
|
||||
sql += " AND updated_at >= ?"
|
||||
params.append(filters["after_updated_at"])
|
||||
if "start_id" in filters:
|
||||
sql += " AND id > ?"
|
||||
params.append(filters["start_id"])
|
||||
|
||||
Reference in New Issue
Block a user