# -*- coding: utf-8 -*- """ @Author: MasonLiu @Description: 本程序可以爬取各安全资讯源,并发送到飞书群组。 """ import schedule import os import signal import sys import time import yaml import requests from datetime import datetime, timedelta from SendCore.FeishuSendBot import SendToFeishu, gen_sign from SendCore.QiweiSendBot import SendToWX from media.common import run, seebug_main, M_4hou_main, anquanke_main, sec_wiki_main, huawei_main, doonsec_main, qianxin_main from media.freebuf import freebuf_main from media.xianzhi import xianzhi_main from media.sougou_wx import sougou_wx_main from media.github import github_main from GotoSend.M_4hou import Src_4hou from GotoSend.anquanke import Src_anquanke from GotoSend.doonsec import Src_doonsec from GotoSend.xianzhi import Src_xianzhi from GotoSend.freebuf import Src_freebuf from GotoSend.qianxin import Src_qianxin from GotoSend.seebug import Src_seebug from GotoSend.sougou_wx import Src_sougou_wx # from GotoSend.github import Src_github from config.check_config import get_core_config, get_debug_config, get_kewords_config from loguru import logger # # 全局变量 # webhook_url_once, timestamp_once, sign_once = gen_sign() # e_hour, time_choice, choice, fs_activate, wx_activate, ding_activate, lx_activate, url_web = get_core_config() # Sogou_WX = get_kewords_config() # webhook_url, timestamp, sign = gen_sign() # sougou_wx_main(Sogou_WX) # result_sx_long = Src_sougou_wx(False) # result_sx_short = Src_sougou_wx(True) # webhook_url, timestamp, sign = gen_sign() # SendToFeishu(result_sx_long, "微信公众号关键词相关内容", webhook_url, timestamp, sign) github_main() # # 测试用消息体 # test_msg = { # "请单件文档查看昨天讨论的方案相关飞书文档,注意作者为 **张三** 版本为 \n*002* ,版本 ~~001~~ 已经删除。文件地址是 [https://www.feishu.cn](https://www.feishu.cn),打开次数:1次" # } # SendToFeishu(test_msg, "先知社区资讯递送", webhook_url, timestamp, sign)