Git Product home page Git Product logo

qiangke's Introduction

qiangke

暨南大学抢课脚本(适用于第二第三阶段)

使用方法

部署好selenium环境(用于获取cookie) (修改main函数的必要设置) 输入账号密码 修改需要筛选课程的编号(需要同步修改querySetting中的queryContent参数) 运行并等待 输出课程名及监测次数则标明部署成功

基本原理

每隔一定时间获取一次选课记录,筛选出给定课程,如果课程有余量则选课,反之继续等待

注意事项

  1. cookie更新时需要过滑块验证,这部分耗时较长,第一次使用可以开启selenium的可视化观察是否成功
  2. token获取时偶现失败现象,时间有限并未深究原因,一般重启即可
  3. 获取课程信息频率不能太高,默认为10s一次,频率过高可能被风控
  4. 本脚本用于帮助选不到课就难以毕业的同学,请勿用于其他不良用途
  5. 点名批评垃圾学校的学分制度以及容量极其小的高英部分课程

有效日期

截止于 2023/6/20 18:00 实测有效

qiangke's People

Contributors

jimieguang avatar

Stargazers

Yang Zilong avatar SAYONARA avatar  avatar  avatar  avatar  avatar  avatar Letong Liu avatar Yuqin Hong avatar  avatar  avatar

Watchers

 avatar

Forkers

aaarisle changocr

qiangke's Issues

1.数据太HardCode,不是在一个统一的地方填数据,而是要在各个地方配自己的包头填白名单 2.fliter中print信息不够,几次if判断如果为false并没有给到很好的反馈

if infos_dict["msg"] == "查询推荐选课成功":
    for dataList in infos_dict["dataList"]:
        if dataList["courseNumber"] in ["08060324"]:
            print(dataList["courseName"]+f" nums:{num}")
            if dataList["isFull"] != "1":
                res = final_choice(number,cookie,token,dataList["teachingClassID"])
                return res

如果课程不在白名单里,或者没满是不是应该给提示。
包头参数有没有可能开放出来作为一个变量,而不是直接作为字符串塞在querySetting里面,这一套也只能给会抓request包debugPython的人用,建议改改普及一下广大学弟学妹。

无法正常获取cookie

cookie获取的值不符合要求,跑不起来。同时说明书给的是chorme但是代码用的firefox,也是需要调试半天。目前我是手动每半小时粘贴一次cookie直接赋值。求问更合理的解决方式

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.