Skip to content

IanLi592/fishcwatcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

鱼C论坛闪拍监控工具

这是一个用于监控鱼C论坛闪拍页面主题数量变化的工具,当检测到变化时会通过邮件或微信发送通知。

📁 项目结构

fishcwatcher/
├── fishc_monitor.py          # 主监控程序
├── requirements.txt          # Python依赖包列表
├── init_directories.py       # 目录初始化脚本
├── README.md                # 项目说明文档
├── config/                  # 配置文件目录
│   └── config.json         # 主配置文件
├── scripts/                 # 启动脚本目录
│   ├── install_dependencies.bat    # Windows依赖安装
│   ├── install_dependencies.sh     # Linux依赖安装
│   ├── start_monitor.bat           # Windows启动脚本
│   ├── start_monitor.sh             # Linux启动脚本
│   ├── start_scheduled_monitor.bat  # Windows定时启动
│   ├── start_scheduled_monitor.sh   # Linux定时启动
│   ├── run_background.sh            # Linux后台运行
│   ├── stop_monitor.sh              # Linux停止脚本
│   ├── check_status.sh              # Linux状态检查
│   ├── install_service.sh           # Linux服务安装
│   └── fishc-monitor.service        # systemd服务文件
├── data/                    # 数据文件目录
│   ├── monitor_state.json  # 监控状态数据
│   └── page_content.html   # 页面内容缓存
├── tests/                   # 测试文件目录
│   ├── test_parser.py      # 解析器测试
│   └── test_schedule.py    # 调度测试
└── docs/                    # 文档目录
    └── README.md           # 详细文档

🚀 快速开始

Windows 环境

  1. 安装依赖

    scripts\install_dependencies.bat
  2. 配置通知 编辑 config/config.json 文件,设置邮件或微信通知

  3. 启动监控

    scripts\start_monitor.bat

Linux 环境

  1. 设置权限

    chmod +x scripts/*.sh
  2. 安装依赖

    ./scripts/install_dependencies.sh
  3. 配置通知 编辑 config/config.json 文件

  4. 选择运行方式

    • 前台运行:./scripts/start_monitor.sh
    • 后台运行:./scripts/run_background.sh
    • 系统服务:sudo ./scripts/install_service.sh

⚙️ 配置说明

配置文件位于 config/config.json,主要配置项:

  • url: 监控的页面地址
  • schedule: 定时调度配置
    • enabled: 是否启用定时调度
    • time: 检查时间(如 "09:00")
  • email: 邮件通知配置
  • wechat: 微信通知配置

📊 监控功能

  • 🕘 定时检查:每天固定时间检查(默认9:00)
  • 📧 邮件通知:支持SMTP邮件通知
  • 💬 微信通知:支持企业微信机器人
  • 💾 状态保存:自动保存监控状态
  • 📝 详细日志:完整的运行日志记录

🔧 管理命令

Windows

  • 启动监控:scripts\start_monitor.bat
  • 安装依赖:scripts\install_dependencies.bat

Linux

  • 启动监控:./scripts/start_monitor.sh
  • 后台运行:./scripts/run_background.sh
  • 检查状态:./scripts/check_status.sh
  • 停止监控:./scripts/stop_monitor.sh
  • 安装服务:sudo ./scripts/install_service.sh

📋 系统要求

  • Python 3.6+
  • 网络连接
  • 邮箱或企业微信(用于通知)

🆘 故障排除

  1. 配置文件不存在:程序会自动创建默认配置
  2. 目录不存在:程序会自动创建必要目录
  3. 权限问题:确保脚本有执行权限
  4. 网络问题:检查网络连接和防火墙设置

📄 许可证

本项目采用 MIT 许可证。

About

Project to watch the Flash Auction of FishC

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published