This commit is contained in:
MasonLiu 2025-01-23 10:20:10 +08:00
parent f1ee2d1092
commit 36c9b9beb4
2 changed files with 21 additions and 9 deletions

28
Core.py
View File

@ -30,7 +30,7 @@ from GotoSend.seebug import Src_seebug
from GotoSend.sougou_wx import Src_sougou_wx
from GotoSend.github import Src_github
from GotoSend.baidu import Src_baidu
from config.check_config import get_core_config, get_debug_config, get_kewords_config
from config.check_config import get_core_config, get_debug_config, get_keywords_config
from loguru import logger
# 清除所有已有的日志记录器配置
@ -86,7 +86,7 @@ def check_avaliable(info_long, info_short, title):
time.sleep(15)
def send_job_RSS(time_1):
Doonsec_switch, Doonsec = get_kewords_config('Doonsec')
Doonsec_switch, Doonsec = get_keywords_config('Doonsec')
# Seebug数据获取分发
seebug_main()
@ -155,7 +155,7 @@ def send_job_RSS(time_1):
logger.info("洞见微信安全数据为空,跳过执行。")
def send_job_SX():
Sogou_WX = get_kewords_config('Sogou-WX')
Sogou_WX = get_keywords_config('Sogou-WX')
sougou_wx_main(Sogou_WX)
result_sx_long, result_sx_short = Src_sougou_wx()
check_avaliable(result_sx_long, result_sx_short, "微信公众号关键词相关内容")
@ -178,7 +178,7 @@ def send_job_github(time_1):
check_avaliable(result_github_4_long, result_github_4_short, "Github项目监控-项目版本发布监测")
def send_job_baidu():
Baidu = get_kewords_config('Baidu')
Baidu = get_keywords_config('Baidu')
baidu_main(Baidu)
result_baidu_long, result_baidu_short = Src_baidu()
check_avaliable(result_baidu_long, result_baidu_short, "百度搜索关键词相关内容")
@ -270,11 +270,23 @@ def send_first_message():
if 0 in choice:
start_info += "RSS源监测\n"
if 1 in choice:
start_info += "搜狗-微信公众号监测\n"
# start_info += "搜狗-微信公众号监测\n"
Sogou_WX = get_keywords_config('Sogou-WX')
start_info += f"微信公众号监测关键词:{Sogou_WX}\n"
if 2 in choice:
start_info += "Github项目监测\n"
# start_info += "Github项目监测\n"
with open('./config/github_config.yaml', 'r', encoding="utf-8") as file:
config = yaml.safe_load(file)
tool_list = config['tool_list']
start_info += f"Github监控项目{tool_list}\n"
keyword_list = config['keyword_list']
start_info += f"Github监控关键词{keyword_list}\n"
user_list = config['user_list']
start_info += f"Github监控用户{user_list}\n"
if 3 in choice:
start_info += "百度搜索关键词内容监测\n"
# start_info += "百度搜索关键词内容监测\n"
Baidu = get_keywords_config('Baidu')
start_info += f"百度搜索关键词:{Baidu}\n"
if fs_activate == "True":
result = SendToFeishu(start_info, "程序信息", webhook_url_once, timestamp_once, sign_once)
@ -284,7 +296,7 @@ def send_first_message():
if wx_activate == "True":
result = SendToWX(start_info, "程序信息")
logger.info(result)
send_result = SendToWX(f"[点此访问]({url_web})网站以查看全部文章", "首次运行提醒")
send_result = SendToWX(f"[点此访问]({url_web})网站以查看全部文章,若未开启网站请忽略本条消息", "首次运行提醒")
logger.info(send_result)
if 0 in choice:

View File

@ -66,7 +66,7 @@ def get_debug_config():
return debug
def get_kewords_config(item):
def get_keywords_config(item):
with open('./config/keywords.yaml', 'r', encoding="utf-8") as file:
config = yaml.safe_load(file)
if item == 'Doonsec':