premier-league-monitor

Premier League Real-time Push Daemon: A real-time push service using Fanbao data source with 15-second polling, delivering events such as kick-off, goals, corners, yellow cards, red cards, half-time, and full-time to QQ and WeChat.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "premier-league-monitor" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-02153a5a7d58545d59e63fd3d4b3db9942d3792125714ed765e4bec699f2d938. Verify the upstream source and version against https://skillhub.cn/skills/user_dcfc00bb/premier-league-pro before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Premier League Real-time Push Daemon: A real-time push service using Fanbao data source with 15-second polling, delivering events such as kick-off, goals, corners, yellow cards, red cards, half-time, and full-time to QQ and WeChat.

0 Downloads

Introduction source: third_party · user_dcfc00bb · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Software, accounts and paid services
Translation pending; see source documentation.
Limits and differences
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: premier-league-monitor
description: 英超比赛实时推送守护进程(球迷宝数据源,15秒轮询,开场/进球/角球/黄牌/红牌/半场/完赛事件推送至QQ+微信)
tags: [daemon, systemd, premier-league, football, realtime]

英超比赛实时推送

基于球迷宝数据源的英超比赛实时监控守护进程,自动检测比赛事件并推送到 QQ 和微信。

功能特性

实时监控

  • 轮询间隔:15秒(可配置)
  • 数据源:球迷宝双接口(live/all.htm + bifen4pc/list.htm)
  • 过滤条件:仅监控英超联赛(league_id=87)

推送事件类型

事件 说明 触发条件 默认开关
🏟️ 开场 比赛开始 state 0→1 ✅ 开启
⚽ 进球 进球事件 player_data.code=1/2/6 ✅ 开启
🚩 角球 角球数增加 corner_h/corner_a 变化 ✅ 开启
🟨 黄牌 黄牌事件 code=4 ✅ 开启
🟥 红牌 红牌事件 code=5 ✅ 开启
🔄 半场 上半场结束 period_cn 含"中场" ✅ 开启
🏁 完赛 全场结束 state→3 ✅ 开启

推送通道

通道 说明 配置项 默认值
QQ 通过 Hermes send 命令推送 PUSH_QQ True
微信 通过 Hermes send 命令推送 PUSH_WEIXIN False

推送格式示例

开场推送

⚽ 比赛开始!阿根廷 vs 瑞士
⏰ 开赛时间:2026-07-12 03:00
📍 场馆:马拉卡纳体育场

进球推送

⚽ 进球!阿根廷 1-0 瑞士
⏱️ 23' 梅西

角球推送

🚩 角球 阿根廷 7-2 瑞士
⏱️ 72' 阿根廷 角球

黄牌推送

🟨 阿根廷 0-1 瑞士
⏱️ 72' 瑞士 恩博洛 黄牌

红牌推送

🟥 阿根廷 0-1 瑞士
⏱️ 72' 瑞士 恩博洛 红牌

半场推送

🔄 半场结束 阿根廷 1-0 瑞士
📊 半场统计:射门 8-3 / 角球 5-2 / 控球 62%-38%

完赛推送(常规时间)

🏁 全场结束 阿根廷 2-1 瑞士
📊 最终比分:2-1
🏆 阿根廷获胜

完赛推送(加时决胜)

🏁 全场结束 挪威 1-1 英格兰
📊 半场 (半: 1-1)
📈 最终比分 1-2
📋 加时0-1 -> 90' 1-1 -> 120' 1-2
🏆 英格兰晋级

完赛推送(点球大战)

🏁 全场结束 阿根廷 0-0 哥伦比亚
📊 半场 (半: 0-0)
📈 90' 0-0
🥅 点球 4-3
🏆 阿根廷晋级

安装部署

前置条件

  1. Hermes Agent:已安装并配置好

    • Python 3.8+
    • 系统级或用户级安装均可
  2. systemd user service:需要支持 systemd 的用户服务

    • Linux 系统(Ubuntu/Debian/CentOS 等)
    • 已启用 linger(loginctl enable-linger $USER)
  3. 网络访问:能够访问球迷宝 API

    • https://matchs.qiumibao.com
    • https://bifen4m.qiumibao.com

安装步骤

步骤 1:复制 skill 目录

将整个 premier-league-monitor 目录复制到 Hermes skills 目录:

# 假设你的 Hermes skills 目录在 ~/.hermes/skills/
cp -r premier-league-monitor ~/.hermes/skills/monitoring/

步骤 2:创建 systemd 服务文件

mkdir -p ~/.config/systemd/user
cat > ~/.config/systemd/user/hermes-premier-league-monitor.service <<EOF
[Unit]
Description=Hermes Premier League Match Monitor Daemon
After=network.target

[Service]
Type=simple
WorkingDirectory=/home/agentuser/.hermes/skills/monitoring/premier-league-monitor
ExecStart=/usr/bin/python3 /home/agentuser/.hermes/skills/monitoring/premier-league-monitor/premier-league.py --daemon
Restart=on-failure
RestartSec=10

[Install]
WantedBy=default.target
EOF

注意:请根据实际情况修改以下路径:

  • WorkingDirectory:skill 所在目录的绝对路径
  • ExecStart:Python 解释器路径和脚本路径(现在是 premier-league.py)

步骤 3:启用并启动服务

# 重新加载 systemd 配置
systemctl --user daemon-reload

# 启用服务(开机自启)
systemctl --user enable hermes-premier-league-monitor.service

# 启动服务
systemctl --user start hermes-premier-league-monitor.service

步骤 4:验证运行状态

# 查看服务状态
systemctl --user status hermes-premier-league-monitor.service

# 查看日志
tail -f ~/.hermes/skills/monitoring/premier-league-monitor/daemon.log

配置推送通道

编辑 premier-league.py 文件顶部的配置项:

# ===== 推送通道配置 =====
PUSH_QQ = True          # 是否推送到 QQ(True/False)
PUSH_WEIXIN = False     # 是否推送到微信(True/False)

# ===== 事件推送开关 =====
PUSH_GOALS = True       # 是否推送进球事件
PUSH_CORNER = True      # 是否推送角球事件
PUSH_YELLOW = True      # 是否推送黄牌事件
PUSH_RED = True         # 是否推送红牌事件

# ===== 其他配置 =====
POLL_INTERVAL = 30      # 轮询间隔(秒),建议 15-60
DAEMON_INTERVAL_SECONDS = 30  # 守护进程内部间隔(秒)

修改后重启服务:

systemctl --user restart hermes-premier-league-monitor.service

使用说明

查看实时日志

tail -f ~/.hermes/skills/monitoring/premier-league-monitor/daemon.log

手动测试推送

# 进入 skill 目录
cd ~/.hermes/skills/monitoring/premier-league-monitor

# 单次运行(非守护进程模式)
python3 premier-league.py

停止服务

systemctl --user stop hermes-premier-league-monitor.service

禁用开机自启

systemctl --user disable hermes-premier-league-monitor.service

完全卸载

# 停止并禁用服务
systemctl --user stop hermes-premier-league-monitor.service
systemctl --user disable hermes-premier-league-monitor.service

# 删除服务文件
rm ~/.config/systemd/user/hermes-premier-league-monitor.service

# 重新加载 systemd 配置
systemctl --user daemon-reload

# 删除 skill 目录(可选)
rm -rf ~/.hermes/skills/monitoring/premier-league-monitor

故障排查

服务无法启动

  1. 检查 Python 路径:

    which python3
    # 确保 ExecStart 中的路径正确
  2. 检查权限:

    ls -la ~/.hermes/skills/monitoring/premier-league-monitor/worldcup.py
    # 确保有执行权限
    chmod +x ~/.hermes/skills/monitoring/premier-league-monitor/worldcup.py
  3. 检查工作目录:

    # 确保 WorkingDirectory 指向正确的目录
    pwd

没有收到推送

  1. 检查 Hermes 配置:

    # 确保 Hermes 已配置 QQ/微信推送
    hermes config get push
  2. 检查网络连接:

    curl -I https://matchs.qiumibao.com/live/all.htm
  3. 查看日志:

    tail -n 100 ~/.hermes/skills/monitoring/premier-league-monitor/daemon.log

推送重复或遗漏

  1. 清除状态缓存:
    rm ~/.hermes/skills/monitoring/premier-league-monitor/cache/notified_matches.json
    systemctl --user restart hermes-premier-league-monitor.service

技术细节

数据源说明

接口 URL 用途
live/all.htm https://matchs.qiumibao.com/live/all.htm 主要数据源,包含角球、黄牌、红牌、比分、state
bifen4pc/list.htm https://bifen4m.qiumibao.com/json/v2/list.htm 辅助数据源,包含进球详情、完整比分变化

状态文件

位置:cache/notified_matches.json

记录内容:

  • events_seen:已推送的事件 ID 列表
  • corner_h/corner_a:主队/客队角球数
  • yellow_h/yellow_a:主队/客队黄牌数
  • red_h/red_a:主队/客队红牌数
  • half_pushed:是否已推送半场
  • full_pushed:是否已推送完赛

锁机制

使用文件锁防止多实例运行:

  • 锁文件:daemon.pid.lock
  • PID 文件:daemon.pid

注意事项

  1. 仅支持 Hermes:本 skill 专为 Hermes Agent 设计,暂不支持 OpenClaw。

  2. 网络依赖:需要稳定的网络连接访问球迷宝 API。

  3. 时区问题:所有时间显示为北京时间(UTC+8)。

  4. 数据准确性:数据来源于第三方 API,可能存在延迟或误差。

  5. 资源占用:每 15 秒轮询一次,对系统资源消耗极低。

更新日志

v1.0.0 (2026-07-12)

  • 初始版本
  • 支持英超联赛实时监控
  • 支持 QQ/微信推送
  • 支持加时/点球大战比分显示
  • 支持黄牌球员名显示

许可证

MIT License

作者

M哥 QQ:1358804498

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value78/100

Highlights

  • 功能完整,涵盖英超比赛实时监控、多种事件推送、QQ/微信双通道推送
  • 提供详细的安装部署指南和故障排查说明,实用性强
  • 支持加时/点球大战比分显示,满足球迷核心需求
Trigger Precision75/100

Areas to improve

  • 触发条件描述不完整 Reported severity: Minor

    文档中缺少用户如何触发该技能的具体说明,仅描述了技能自身的功能和配置

    Recommendation: 建议补充用户触发该技能的具体方式,如通过Hermes命令或API调用等

Highlights

  • 功能描述清晰,包含具体的事件类型和推送格式
  • 配置项说明详细,便于用户理解和配置
Structure and Standards85/100

Highlights

  • 文档结构完整,包含功能特性、安装部署、使用说明、故障排查等必要章节
  • 提供详细的配置示例和推送格式示例,便于用户理解和操作
  • frontmatter完整,包含name、description、tags等必要信息
Execution Reliability78/100

Areas to improve

  • API调用错误处理不完善 Reported severity: Minor

    文档中提到了网络连接检查,但缺少对API调用失败的具体重试机制和错误处理说明

    Recommendation: 建议补充API调用失败时的重试策略和错误处理机制,提高执行可靠性

Highlights

  • 工具来源明确,使用球迷宝API作为数据源
  • 参数配置清晰,包含轮询间隔、推送通道等可配置项
  • 提供详细的故障排查指南,覆盖常见问题和解决方案
Evidence Verifiability (mean of the first four)79/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • bifen4m.qiumibao.com
  • matchs.qiumibao.com

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Translation pending; see source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.