GithubHelp home page GithubHelp logo

imaotai-reserve's Introduction

i茅台预约工具----GitHub Actions版

GitHub Stars GitHub Forks GitHub Closed Issues GitHub commit activity (branch) GitHub Last Commit

功能:

  • 集成Github Actions
  • 多账号配置
  • 账号有效期管控
  • 手机号加密保存
  • 自动获取app版本
  • 微信消息推送

原理:

1、登录获取验证码
2、输入验证码获取TOKEN
3、获取当日SESSION ID
4、根据配置文件预约CONFIG文件中,所在城市的i茅台商品

使用方法

Overview

  1. 需要先在本地运行登录脚本,配置好登录信息和抢购信息。
  2. 配置 Github Actions 环境变量如下(环境名称以及解释)
    • PUSHPLUS_KEY:推送信息的 key
    • PRIVATE_AES_KEY:自定义私钥(吧)
    • CREDENTIALS_BASE64: credential.base64这个文件的内容,即原项目中./myConfig/credentials文件内容经过 base64 编码后得到的字符串。

具体使用步骤:

本地 run 的部分

如果不需要添加手机号,则login.py只需要跑一次,因为每添加一个手机号,都会写入一次本地文件。

  1. 安装依赖
pip3 install --no-cache-dir -r requirements.txt
  1. 修改config.py,按照你的需求修改相关配置,这里很重要,建议每个配置项都详细阅读。(注意不要泄露自己的 TOKEN 哈!)
  2. 再去配置环境变量 GAODE_KEY,再运行login.py。高德 API Token用于根据预约位置寻找最近的茅台专卖店。
  3. 按提示输入 预约位置、手机号、验证码 等,生成的token等。很长时间不再需要登录。支持多账号,支持加密。
python3 login.py
# 都填写完之后可以去./myConfig/credentials中查看明文的配置信息

需要 Github 上配置的部分

请确保本地运行部分已执行,./myConfig/credentials.base64已经生成

  1. 配置github secrets,共 3 项
    • PUSHPLUS_KEY:推送信息的 key,去 PushPlus官网 申请一个,分分钟搞定
    • PRIVATE_AES_KEY:自定义私钥(吧),随便写个喜欢的字符串
    • CREDENTIALS_BASE64: ./myConfig/credentials.base64这个文件的内容

特别感谢

技术思路:https://blog.csdn.net/weixin_47481826/article/details/128893239

初版代码:https://github.com/tianyagogogo/imaotai

imaotai-reserve's People

Contributors

397179459 avatar jaxx4fun avatar alsnei 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.