TrendRadar/config/config.yaml
2025-10-10 21:32:41 +08:00

101 lines
4.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

app:
version_check_url: "https://raw.githubusercontent.com/sansan0/TrendRadar/refs/heads/master/version"
show_version_update: true # 控制显示版本更新提示,如果 false则不接受新版本提示
crawler:
request_interval: 1000 # 请求间隔(毫秒)
enable_crawler: true # 是否启用爬取新闻功能,如果 false则直接停止程序
use_proxy: false # 是否启用代理false 时为关闭
default_proxy: "http://127.0.0.1:10086"
# 🔸 daily当日汇总模式
# • 推送时机:按时推送(默认每小时推送一次)
# • 显示内容:当日所有匹配新闻 + 新增新闻区域
# • 适用场景:日报总结、全面了解当日热点趋势
#
# 🔸 current当前榜单模式
# • 推送时机:按时推送(默认每小时推送一次)
# • 显示内容:当前榜单匹配新闻 + 新增新闻区域
# • 适用场景:实时热点追踪、了解当前最火的内容
#
# 🔸 incremental增量监控模式
# • 推送时机:有新增才推送
# • 显示内容:新出现的匹配频率词新闻
# • 适用场景:避免重复信息干扰
# 推送模式选择
report:
mode: "daily" # 可选: "daily"|"incremental"|"current"
rank_threshold: 5 # 排名高亮阈值
notification:
enable_notification: true # 是否启用通知功能,如果 false则不发送手机通知
message_batch_size: 4000 # 消息分批大小(字节)(这个配置别动)
dingtalk_batch_size: 20000 # 钉钉消息分批大小(字节)(这个配置也别动)
batch_send_interval: 1 # 批次发送间隔(秒)
feishu_message_separator: "━━━━━━━━━━━━━━━━━━━" # feishu 消息分割线
# 🕐 推送时间窗口控制(可选功能)
# 用途:限制推送的时间范围,避免非工作时间打扰
# 适用场景:
# - 只想在工作日白天接收推送(如 9:00-18:00
# - 希望在晚上固定时间收到汇总(如 20:00-22:00
push_window:
enabled: false # 是否启用推送时间窗口控制,默认关闭
# 注意GitHub Actions 执行时间不稳定,时间范围建议至少留足 2 小时
# 如果想要精准的定时推送,建议使用 Docker 部署在个人服务器上
time_range:
start: "20:00" # 推送时间窗口开始(北京时间)
end: "22:00" # 推送时间窗口结束(北京时间)
once_per_day: true # 每天在时间窗口内只推送一次,如果 false则窗口内每次执行都推送
push_record_retention_days: 7 # 推送记录保留天数
# 请务必妥善保管好 webhooks不要公开
# 如果你以 fork 的方式将本项目部署在 GitHub 上,请勿在此填写任何 webhooks而是将 webhooks 填入 GitHub Secret
# 不然轻则手机上收到奇怪的广告推送,重则存在更严重的安全隐患
webhooks:
feishu_url: "" # 飞书机器人的 webhook URL
dingtalk_url: "" # 钉钉机器人的 webhook URL
wework_url: "" # 企业微信机器人的 webhook URL
telegram_bot_token: "" # Telegram Bot Token
telegram_chat_id: "" # Telegram Chat ID
email_from: "" # 发件人邮箱地址
email_password: "" # 发件人邮箱密码或授权码
email_to: "" # 收件人邮箱地址,多个收件人用逗号分隔
email_smtp_server: "" # SMTP服务器地址可选留空自动识别
email_smtp_port: "" # SMTP端口可选留空自动识别
ntfy_server_url: "https://ntfy.sh" # ntfy服务器地址默认使用公共服务可改为自托管地址
ntfy_topic: "" # ntfy主题名称
ntfy_token: "" # ntfy访问令牌可选用于私有主题
# 用于让关注度更高的新闻在更前面显示,即用算法重新组合不同平台的热搜排序形成你侧重的热搜,合起来是 1 就行
weight:
rank_weight: 0.6 # 排名权重
frequency_weight: 0.3 # 频次权重
hotness_weight: 0.1 # 热度权重
# name 可以定义任意名称,只具有显示作用,即使项目运行了几天后,忽然改掉 name 也不会影响代码的正常运行
platforms:
- id: "toutiao"
name: "今日头条"
- id: "baidu"
name: "百度热搜"
- id: "wallstreetcn-hot"
name: "华尔街见闻"
- id: "thepaper"
name: "澎湃新闻"
- id: "bilibili-hot-search"
name: "bilibili 热搜"
- id: "cls-hot"
name: "财联社热门"
- id: "ifeng"
name: "凤凰网"
- id: "tieba"
name: "贴吧"
- id: "weibo"
name: "微博"
- id: "douyin"
name: "抖音"
- id: "zhihu"
name: "知乎"