Coder Social home page Coder Social logo

nuit-library-seats's Introduction

Nuit-Library-Seats

fork: https://github.com/bear-zd/ChaoXingReserveSeat

setting

before running the script , you should install a package pip install pycrypto

and edit the config.json to make this script work.

addition

添加签到功能,每次启动默认为当前用户签到,可以在配置文件中修改sign=0来取消签到

{
  "settings": {
    "SYS_SLEEP_TIME": 1, // 每个帐号抢的间隔
    "SYS_END_TIME": "22:01:00" // 抢座位的截止时间
  },
  "reserve": [
    {
      "username": "username",
      "password": "password",
      "sign": 1, // 是否自动签到
      "day": 1, // 0:今天,1:明天,2:后天,以此类推
      "roomid": "6993", // 房间编号
      "seatid": [
        "105" // 座位编号
      ],
      "time": [
        ["8:30", "12:30"],
        ["12:30", "16:30"],
        ["16:30", "20:30"],
        ["20:30", "22:00"]
      ],
      "wait_time": 1, // 每次抢time中的时间间隔,实测东软1s间隔不会有太大问题
      "flag": 0 // 是否需要反复抢,东软基本上没人跟你抢。。
    }
  ]
}

What you should do is just set a crontab on your server to run this script.

running

Use python main.py to run this script, add arguement -u config.json to point the config file posision

In linux/macos , you can just set a crontab : crontab -e and add the command : 0 8 * * * cd ~/Desktop/pythonProject/Nuit-Library-Seats && source venv/bin/activate && python3 main.py >> log.txt 2>&1

每早八点定时跑脚本

In windows, you can add a time task:

nuit-library-seats's People

Contributors

caiyuhu avatar rlxzmdd avatar bear-zd 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.