Giter VIP home page Giter VIP logo

12306monitor's Introduction

12306ByPass辅助程序

监控抢票状态,然后通过各种方式通知你,默认支持钉钉机器人,同时支持WebHook

安装

  • git clone
  • pip install requests
  • pip install pywin32

配置

请注意配置文件格式为json,引号全部使用双引号,文件编码为UTF-8

通用

  • interval: 监控周期, 默认1秒一次

简单版

  • 创建一个钉钉群
  • 添加自定义群机器人,获取WebHook地址
  • 将access_token填入config.json中"dingTokenListImportant"字段

进阶版

  • 简单版
  • 如果你希望获取一些其他信息,可以修改"monitorWord"和"gohomeWord"字段,只要日志中包含该关键词,则会使用"dingTokenListVerbose"和"dingTokenListImportant"对应的钉钉机器人进行推送

复杂版

  • 支持WebHook方式
  • 按照WebHook需要的请求类型,配置enableGetWebHook/enablePostWebHook为true即可
  • 填写WebHook地址,分别对应getWebHook/postWebHook
    • 程序会自动替换其中对应的$message字段
    • 如果是POST类型,需要POST的数据请填写到postWebHookData
  • postWebHookType
    • formdata/json

运行

  • 修改配置后,执行python main.py 即可
  • 另外可以执行python test.py测试通知是否正常,请修改config.json后测试

拓展

注意: 省略部分不代表不需要

Server酱配置

{
    "...": "...",
    "getWebHook": "https://sc.ftqq.com/SCKEY.send?text=$message",
    "...": "..."
}

{
    "...": "...",
    "postWebHook": "https://sc.ftqq.com/SCKEY.send",
    "postWebHookData": {
        "text": "抢到票啦,快去付款吧",
        "desp": "Markdown"
    },
    "postWebHookType": "formdata",
    "...": "..."
}

语音电话

  • 注册云片,新用户有10条语音短信的额度
    • 友情提醒,我注册后没隔多久就接到了客服打来的营销电话
  • 获取APIKEY,填入yunpianApiKey字段
  • 配置enableMobiletrue
  • 配置接收电话的手机号notifyMobile
  • python test.py测试,你会接到一个验证码为12306的电话😊
{
    "...": "...",
    "enableMobile": true,
    "yunpianApiKey": "APIKEY",
    "notifyMobile": "手机号",
    "...": "..."
}

讨论群

微信群

12306monitor's People

Contributors

androiddiordna avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.