Bugs fixed

This commit is contained in:
MasonLiu 2025-01-22 15:11:15 +08:00
parent fd7a51f24b
commit f1ee2d1092
5 changed files with 16 additions and 14 deletions

View File

@ -147,7 +147,7 @@ def send_job_RSS(time_1):
# 洞见微信安全数据获取分发
doonsec_main()
doonsec_results = Src_doonsec(False, Doonsec_switch, Doonsec)
doonsec_results = Src_doonsec(Doonsec_switch, Doonsec)
if doonsec_results != False:
result_doonsec_long, result_doonsec_short = doonsec_results
check_avaliable(result_doonsec_long, result_doonsec_short, "洞见微信安全资讯")

View File

@ -116,8 +116,8 @@ def get_filtered_articles(entries):
# 构建短文本结果并进行分块处理
current_entry = (
f"文章:{entry[1]}\n"
f"链接:{entry[2]}\n上传时间:{entry[5]}\n"
f"文章:[{entry[1]}]({entry[2]})\n"
f"上传时间:{entry[5]}\n"
"\n" + "-" * 3 + "\n" # 添加分隔线以便区分不同文章
)
temp_result = result_short + current_entry

View File

@ -153,7 +153,8 @@ def get_filtered_articles(entries):
# 构建短文本结果并进行分块处理
current_entry = (
f"文章:[{entry[1]}]({entry[2]})"
f"文章:[{entry[1]}]({entry[2]})\n"
f"关键词:{entry[6]}\n"
f"上传时间:{entry[4]}\n"
"\n" + "-" * 3 + "\n" # 添加分隔线以便区分不同文章
)

View File

@ -155,7 +155,8 @@ def get_filtered_articles(entries):
# 构建短文本结果并进行分块处理
current_entry = (
f"文章:[{entry[1]}]({entry[2]})"
f"文章:[{entry[1]}]({entry[2]})\n"
f"关键词:{entry[6]}\n"
f"上传时间:{entry[4]}\n"
"\n" + "-" * 3 + "\n" # 添加分隔线以便区分不同文章
)

View File

@ -57,7 +57,7 @@ def github_main_keyword(key, black_words):
api_node = "https://api.github.com/search/repositories?q={}&sort=updated&per_page=20".format(keyword)
result = fetch_rss(api_node)
if result == None:
time.sleep(1)
time.sleep(3)
continue
n = len(result['items'])
for i in range(0, n):
@ -96,7 +96,7 @@ def github_main_keyword(key, black_words):
}
# print(project_info)
all_results.append(project_info)
time.sleep(1)
time.sleep(3)
# 将所有结果写入JSON文件
save_to_json(all_results, './resources/JSON/github_keyword.json')
@ -109,7 +109,7 @@ def github_main_repo(key):
api_node = "https://api.github.com/repos/{}/commits?per_page=1".format(keyword)
result = fetch_rss(api_node)
if result == None:
time.sleep(1)
time.sleep(3)
continue
commit = result[0] # 获取最新的提交记录
@ -142,7 +142,7 @@ def github_main_repo(key):
}
# print(project_info)
all_results.append(project_info)
time.sleep(1)
time.sleep(3)
# 将所有结果写入JSON文件
save_to_json(all_results, './resources/JSON/github_repo.json')
@ -154,11 +154,11 @@ def github_main_release(key):
api_node = "https://api.github.com/repos/{}/releases?per_page=1".format(keyword)
result = fetch_rss(api_node)
if result == None:
time.sleep(1)
time.sleep(3)
continue
if not result:
logger.warning(f"github_repo:项目【{keyword}】不存在版本发布情况。")
time.sleep(1)
time.sleep(3)
continue
# print(result)
@ -177,7 +177,7 @@ def github_main_release(key):
}
# print(project_info)
all_results.append(project_info)
time.sleep(1)
time.sleep(3)
# 将所有结果写入JSON文件
save_to_json(all_results, './resources/JSON/github_release.json')
@ -189,7 +189,7 @@ def github_main_user(key, black_words):
api_node = "https://api.github.com/users/{}/repos?sort=created&per_page=10".format(keyword)
result = fetch_rss(api_node)
if result == None:
time.sleep(1)
time.sleep(3)
continue
for i in range(0, len(result)):
description = result[i]['description']
@ -227,7 +227,7 @@ def github_main_user(key, black_words):
}
# print(project_info)
all_results.append(project_info)
time.sleep(1)
time.sleep(3)
# 将所有结果写入JSON文件
save_to_json(all_results, './resources/JSON/github_user.json')