Giter Site home page Giter Site logo

hostlocautogetpoints's Introduction

HostlocAutoGetPoints

此代码是在inkuang大佬的基础上稍作改变,增加了TG推送。目前原库已GG,感谢MJJ的贡献

推送结果

image

因为发现TG机器人推送内容包含'xxx.xxx.xxx.xxx'时会推送失败,故改为'xxx,xxx,xxx,xxx'以英文逗号形式输出ip地址。

Actions secrets 设置

'HOSTLOC_USERNAME' 用户名,多个用','英文逗号隔开

'HOSTLOC_PASSWORD' 密码,多个用','英文逗号隔开,与用户名一一对应,不对应和上下数量不一致会报错。

'BOT_API' TG机器人的API

'CHAT_ID' 你自己的chat_id

API 在@BotFather申请,chat_id可以通过机器人@userinfobot发送任意消息获取,返回的id即是chat_id

建议搬到私人库自己使用

image

image

Action workflow设置

image

image

image

左边的删除,然后写入

name: 'HostlocAutoGetPoints'

on:
  push:
    branches: 
      - main
  schedule:
    - cron: '0 16 * * *'

jobs:
  get_points:
    runs-on: ubuntu-latest
    steps:
    - name: 'Checkout codes'
      uses: actions/checkout@v2
    - name: 'Set python'
      uses: actions/setup-python@v1
      with:
        python-version: '3.x'
    - name: 'Install dependencies'
      run: python -m pip install --upgrade requests pyaes
    - name: 'Get points'
      env:
        HOSTLOC_USERNAME: ${{ secrets.HOSTLOC_USERNAME }}
        HOSTLOC_PASSWORD: ${{ secrets.HOSTLOC_PASSWORD }}
        BOT_API: ${{ secrets.BOT_API }}
        CHAT_ID: ${{ secrets.CHAT_ID }}
      run: python HostlocGetPoints.py

image

设置好Actions secrets后就可以在Action中运行了。如不运行在库中进行任意提交触发Action即可

hostlocautogetpoints's People

Contributors

623524718 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.