update
This commit is contained in:
1 parent
50b3bacd4c
commit
2655151c24
53 files changed
+6905
-309
No files matched your search
Binary file not shown.
+10
-3
@@ -17,7 +17,10 @@ def get_core_config():
|
||||
# 加载参数
|
||||
with open('./config/config.yaml', 'r', encoding="utf-8") as file:
|
||||
config = yaml.safe_load(file)
|
||||
logger.debug(f"Loaded config: {config}") # 输出加载的配置
|
||||
debug = f"{config['debug']}"
|
||||
if debug == "True":
|
||||
logger.debug("Debug mode is on")
|
||||
logger.debug(f"Loaded config: {config}") # 输出加载的配置
|
||||
|
||||
time_choice = int(f"{config['time_mode']}")
|
||||
choice = config['mode'] # 假设 mode 是一个列表
|
||||
@@ -67,7 +70,11 @@ def get_kewords_config():
|
||||
with open('./config/keywords.yaml', 'r', encoding="utf-8") as file:
|
||||
config = yaml.safe_load(file)
|
||||
Sogou_WX = config['Sogou-WX']
|
||||
Doonsec_switch = f"{config['Doonsec-switch']}"
|
||||
Doonsec_switch = config.get('Doonsec-switch', False)
|
||||
Doonsec = config['Doonsec']
|
||||
|
||||
return Sogou_WX, Doonsec_switch, Doonsec
|
||||
# print (Sogou_WX, Doonsec_switch, Doonsec)
|
||||
return Sogou_WX, Doonsec_switch, Doonsec
|
||||
|
||||
if __name__ == "__main__":
|
||||
get_kewords_config()
|
||||
+2
-2
@@ -29,7 +29,7 @@ e_hour: 4 # 程序运行时间间隔
|
||||
time_mode: 1
|
||||
# 0:定时运行模式,仅在指定时间运行(参照Core.py中设置)
|
||||
# 1:启用循环,一定间隔时间后运行
|
||||
mode: [1, 2] # 运行模式,可多选
|
||||
mode: [0] # 运行模式,可多选
|
||||
# 0:启用RSS抓取模式
|
||||
# 1:启用搜狗-微信公众号文章监测
|
||||
# 2:启用github项目监测
|
||||
@@ -38,4 +38,4 @@ mode: [1, 2] # 运行模式,可多选
|
||||
url: https://info.masonliu.com/ # 请设置为您自己反代的域名,或者改为 http://127.0.0.1:5000 或者对应IP域名
|
||||
|
||||
# 调试模式
|
||||
debug: True
|
||||
debug: False
|
||||
Reference in new issue
Block a user