Giter Club home page Giter Club logo

wcy-dt / seu-newcourseelection-helper Goto Github PK

View Code? Open in Web Editor NEW
48.0 2.0 91.0 344 KB

东南大学抢课助手。适配2021版选课系统。脚本仅用于捡漏,虽然理论上也可以抢课,但至少,我自己是不敢尝试的😋。本脚本仅供 SEU er 学习交流使用,出啥问题的话俺一概不负责任

License: GNU General Public License v3.0

Python 99.95% Shell 0.05%
southeast-university course seu selenium election

seu-newcourseelection-helper's Issues

[BUG]

Hello!同学你好!我在线运行程序没反应...尝试下载了你的源码本地运行,但是出了点问题,不知道是不是版本不一致( ´▽` )
我用的python 3.7 --selenium 4.2.0

所以做了一些修改,如果有人遇到类似问题可以参考

  1. 关于Login失败,需要先在webdriver处给出chrome启动器的本地地址,然后绑定python和chrome启动器,有关方式,可以百度/谷歌selenium+chrome有详细教程,很简单。

2.关于find_element_by_xpath,我的编译器提示需要升级(版本?),然后一律改成了find_element(by=By.XPATH,value=...)格式,我测试可以正常运行。不过在使用by之后需要再import By,也就是from selenium.webdriver.common.by import By。

  1. 环境变量。源代码好像是使用环境变量来赋值username等个人信息,可能是为了online运行?我不会github的online怎么搞orz
    所以这里我简化了一下直接采用字符串手输。

  2. 在遍历课程(class_list)和遍历老师(teacher_list)时,find_element改为find_elements,避免出现for循环提示无法迭代的问题。

  3. 在选择页面(pages)时,需要选择当前页面(number active),源代码的value=’number active‘我跑会抛异常...在修改格式后,我把这里一并改为value='//*[@Class="number active"]'的xpath表达式就好了。

  4. 有个问题很好奇?
    源代码对于同一个while循环做了很多次重复,我没太看懂这个的意义orz 试了试f8单步执行感觉并没有用到后面的while,所以上面提到的修改除了第一个while我都没动,目前测试结果不影响正常使用。秉着能动就别管的原则,我把它们都保留了没改hhhhhh

另外我把修改后的代码做了个branch传到我fork走的库里面了,应该可以下载?没在代码里加什么注释,感觉原来的变量命名就挺好懂的,就只做了些修改。

  1. 最后感谢大佬开源(代码风格我好喜欢)。
    本人前端没咋学过,全是面向demo编程⊙﹏⊙∥,要是上述修改有不合适的地方还望指出orz

problems to this helper

First of all, I'm very gratful to you for this helper. This can help a lot and reallly deserves a star!
But I have a small question about this code. When I run the helper.exe,it would quit unexpectedly, this puzzles me a lot. Can you help me to solve this question?
Thanks a lot!

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.