Coder Social home page Coder Social logo

sztu_select_course's Introduction

SZTU教务系统抢课选课小程序

程序基于2023-2024第二学期选课起开始使用的选课分流界面使用selenium模拟选课。

使用说明

前置条件

Python

请使用3.10或更高版本

selenium

浏览器

使用Chrome浏览器,若未安装请先安装,或在main.py login()中修改option与driver参数以使用其他浏览器

随后下载浏览器对应版本的webdriver,并解压至任一环境变量所在目录(方便起见可直接解压至python所在目录)

下载地址:Chrome for Testing availability (googlechromelabs.github.io)

选课信息

根据要求在my_info.py填入相关信息

以下是查看jxid和kcid的步骤

第一个非空字符串为jxid,第二个非空字符串为kcid

find_jxid_kcid

注意事项

  1. 若出现报错请在login()中取消注释此行代码,再次运行查看问题

    option.add_argument("--headless")  # 隐藏浏览器页面
  2. 注意窗口位置,若正式选课窗口不在第0位,请自行修改main.py中该行代码

    driver.switch_to.window(driver.window_handles[0])
    
  3. 若网页出现选课时间内提示“不在选课时间内”,请再次运行程序或尝试在select_course()中,在此行添加断点

    driver.execute_script(js_method)  # 控制台执行选课js方法

    并使用debug模式运行程序

Copyright 2024 by Louis

sztu_select_course's People

Contributors

louis0052 avatar

Stargazers

SukiYou avatar

Watchers

 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.