modify scripts

This commit is contained in:
oscarz
2025-04-24 14:48:02 +08:00
parent 16fe4ec54e
commit a6f99a2551
4 changed files with 38 additions and 12 deletions

View File

@ -595,7 +595,7 @@ def query_movies(identifier):
# 按条件查询 href 列表
def query_movie_hrefs(**filters):
try:
sql = "SELECT href, title FROM javdb_movies WHERE 1=1"
sql = "SELECT href, title, id FROM javdb_movies WHERE 1=1"
params = []
if "id" in filters:
@ -643,7 +643,7 @@ def query_movie_hrefs(**filters):
cursor.execute(sql, params)
#return [row[0].lower() for row in cursor.fetchall()] # 链接使用小写
return [{'href': row[0], 'title': row[1]} for row in cursor.fetchall()]
return [{'href': row[0], 'title': row[1], 'id':row[2]} for row in cursor.fetchall()]
except sqlite3.Error as e:
logging.error(f"查询 href 失败: {e}")