modify scripts

This commit is contained in:
oscarz
2025-03-30 14:35:58 +08:00
parent 8a249eb3ae
commit c6ebe185be
3 changed files with 9 additions and 6 deletions

View File

@ -429,17 +429,17 @@ def insert_or_update_movie(movie):
return None
# """插入或更新电影数据(异常url的处理比如404链接)"""
def insert_or_update_movie_404(title, href):
def insert_or_update_movie_404(title, href, is_full_data=1):
try:
# 插入或更新电影信息
cursor.execute(
"""
INSERT INTO javdb_movies (title, href, is_full_data, updated_at)
VALUES (?, ?, 1, datetime('now', 'localtime'))
VALUES (?, ?, ?, datetime('now', 'localtime'))
ON CONFLICT(href) DO UPDATE SET
title=excluded.title, is_full_data=1, updated_at = datetime('now', 'localtime')
title=excluded.title, is_full_data=excluded.is_full_data, updated_at = datetime('now', 'localtime')
""",
(title, href)
(title, href, is_full_data)
)
conn.commit()