添加对于index.xml的适配,修改自部署代码并测试,完善文档

This commit is contained in:
2024-07-25 23:25:59 +08:00
parent 331d19088c
commit 76f6f43cc9
9 changed files with 552 additions and 120 deletions

4
run.py
View File

@ -15,10 +15,12 @@ if config["spider_settings"]["enable"]:
json_url = config['spider_settings']['json_url']
article_count = config['spider_settings']['article_count']
print("正在从 {json_url} 中获取,每个博客获取 {article_count} 篇文章".format(json_url=json_url, article_count=article_count))
result, _ = fetch_and_process_data(json_url=json_url, count=article_count)
result, lost_friends = fetch_and_process_data(json_url=json_url, count=article_count)
sorted_result = sort_articles_by_time(result)
with open("all.json", "w", encoding="utf-8") as f:
json.dump(sorted_result, f, ensure_ascii=False, indent=2)
with open("errors.json", "w", encoding="utf-8") as f:
json.dump(lost_friends, f, ensure_ascii=False, indent=2)
if config["email_push"]["enable"] or config["rss_subscribe"]["enable"]:
print("获取smtp配置信息")