|
@@ -291,8 +291,30 @@ class VideoProcessor:
|
|
title_list = [new_test_title, new_old_title]
|
|
title_list = [new_test_title, new_old_title]
|
|
else:
|
|
else:
|
|
title_list = [new_old_title]
|
|
title_list = [new_old_title]
|
|
|
|
+
|
|
is_first = True
|
|
is_first = True
|
|
for new_title in title_list:
|
|
for new_title in title_list:
|
|
|
|
+ current_time = datetime.now()
|
|
|
|
+ formatted_time = current_time.strftime("%Y-%m-%d %H:%M:%S")
|
|
|
|
+ title_rule = Material.get_title_rule()
|
|
|
|
+ if title_rule:
|
|
|
|
+ title_rule = title_rule.split(",")
|
|
|
|
+ contains_keyword = any(keyword in new_title for keyword in title_rule)
|
|
|
|
+ if contains_keyword:
|
|
|
|
+ new_title_secure = GPT4oMini.get_ai_mini_title_secure(new_title)
|
|
|
|
+ values = [
|
|
|
|
+ [ channel_id,
|
|
|
|
+ url,
|
|
|
|
+ old_title,
|
|
|
|
+ new_title,
|
|
|
|
+ new_title_secure,
|
|
|
|
+ formatted_time
|
|
|
|
+ ]
|
|
|
|
+ ]
|
|
|
|
+ Feishu.insert_columns("U5dXsSlPOhiNNCtEfgqcm1iYnpf", "V36GHT", "ROWS", 1, 2)
|
|
|
|
+ time.sleep(0.5)
|
|
|
|
+ Feishu.update_values("U5dXsSlPOhiNNCtEfgqcm1iYnpf", "V36GHT", "A2:Z2", values)
|
|
|
|
+ new_title = new_title_secure
|
|
# 更新数据库
|
|
# 更新数据库
|
|
code = cls.upload_video_and_thumbnail(oss_object_key, jpg, v_id, new_title, task_mark, name, piaoquan_id,
|
|
code = cls.upload_video_and_thumbnail(oss_object_key, jpg, v_id, new_title, task_mark, name, piaoquan_id,
|
|
mark, channel_id, url, old_title, rule, video)
|
|
mark, channel_id, url, old_title, rule, video)
|
|
@@ -323,8 +345,7 @@ class VideoProcessor:
|
|
explain = "历史爆款"
|
|
explain = "历史爆款"
|
|
else:
|
|
else:
|
|
explain = "新供给"
|
|
explain = "新供给"
|
|
- current_time = datetime.now()
|
|
|
|
- formatted_time = current_time.strftime("%Y-%m-%d %H:%M:%S")
|
|
|
|
|
|
+
|
|
if name == "品类关键词搜索":
|
|
if name == "品类关键词搜索":
|
|
first_category = task["first_category"]
|
|
first_category = task["first_category"]
|
|
keyword_principal = task["keyword_name"]
|
|
keyword_principal = task["keyword_name"]
|