|
@@ -98,6 +98,18 @@ class Test:
|
|
|
cls.get_score_test(log_type, crawler)
|
|
|
elif response.json()['code'] == -10002:
|
|
|
Common.logger(log_type, crawler).info("该词暂未收录")
|
|
|
+ # 写飞书
|
|
|
+ if word_list[i] in [x for y in Feishu.get_values_batch(log_type, crawler, "5011a2") for x in y]:
|
|
|
+ Common.logger(log_type, crawler).info("该词已存在")
|
|
|
+ break
|
|
|
+ Feishu.insert_columns(log_type, crawler, "5011a2", "ROWS", 1, 2)
|
|
|
+ time.sleep(0.5)
|
|
|
+ Feishu.update_values(log_type, crawler, "5011a2", "F2:Z2",
|
|
|
+ [[time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(int(time.time()))),
|
|
|
+ word_list[i],
|
|
|
+ "",
|
|
|
+ "该词暂未收录"]])
|
|
|
+ Common.logger(log_type, crawler).info("写入飞书成功\n")
|
|
|
elif response.json()['code'] != 0:
|
|
|
Common.logger(log_type, crawler).warning(f"{word_wechat_score_dict}")
|
|
|
else:
|
|
@@ -110,6 +122,9 @@ class Test:
|
|
|
wechat_score_list.append(wechat_score_dict)
|
|
|
Common.logger(log_type, crawler).info(f"wechat_score_dict:{wechat_score_dict}")
|
|
|
# 写飞书
|
|
|
+ if word_list[i] in [x for y in Feishu.get_values_batch(log_type, crawler, "5011a2") for x in y]:
|
|
|
+ Common.logger(log_type, crawler).info("该词已存在")
|
|
|
+ break
|
|
|
Feishu.insert_columns(log_type, crawler, "5011a2", "ROWS", 1, 2)
|
|
|
time.sleep(0.5)
|
|
|
Feishu.update_values(log_type, crawler, "5011a2", "F2:Z2", [[time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(int(time.time()))),
|