|
@@ -30,12 +30,15 @@ def get_material_and_script():
|
|
|
# 1-3 渠道编码&名称
|
|
|
source_name_map = config['source_name_map']
|
|
|
|
|
|
- # 2 读取查询表得到关键词和渠道
|
|
|
- sql = f"select query_word from ctop_ai_script_query_word_config where end_time = '9999-12-31'"
|
|
|
+ # 2 读取查询表 + 推荐词
|
|
|
+ sql = f"select query_word, recommended_word from ctop_ai_script_query_word_config where end_time = '9999-12-31' and operate_type = 1"
|
|
|
df = pd.read_sql(sql, ai_word_engine)
|
|
|
- query_word_lst = list(df['query_word'].unique())
|
|
|
+ query_word_set = set(df['query_word'].values)
|
|
|
+ recommended_word_set = set(df['recommended_word'].values)
|
|
|
+ word_set = query_word_set.union(recommended_word_set)
|
|
|
+ word_set.remove('')
|
|
|
query_word_time = 3
|
|
|
- for query_word in query_word_lst:
|
|
|
+ for query_word in word_set:
|
|
|
for source_code, value in source_name_map.items():
|
|
|
if value['status'] == 1:
|
|
|
# 任务开始执行
|