Giter Club home page Giter Club logo

fucktodaystudy's Issues

签到失败

“今日校园版本过低,请升级至最新版本”失败提示,怎么解决?

我自己爬的数据包这个数据是不是对的

{"appVersion":"9.0.12","
systemName":"android"
,"bodyString":"2Qu***********************************************************************************************************************************************+tEUaXO32J7etba5HkhUo9IJJ9CExBdVUDySLQHx",

"sign":"9********a4a2**********20b42f099"

IndexError: list index out of range

最新版本下:长江大学登录异常

只修改config.ymlsystem.yml文件后(确信无误)

直接python index.py
错误栈详情

Traceback (most recent call last):
File "fuckTodayStudy\index.py", line 29, in main
msg = working(user)
File "fuckTodayStudy\index.py", line 47, in working
today.login()
File "fuckTodayStudy\todayLoginService.py", line 93, in login
self.checkLogin()
File "fuckTodayStudy\todayLoginService.py", line 87, in checkLogin
self.session.cookies = self.loginEntity.login()
File "fuckTodayStudy\login\casLogin.py", line 40, in login
soup = BeautifulSoup(str(form[1]), 'lxml')
IndexError: list index out of range
14:55:46 list index out of range
14:55:46 正在发送邮件通知
Traceback (most recent call last):
...........

经过测试:

  1. 将form[1]改成form[0]后,无此异常
  2. data = self.session.post(self.login_url, params=params, allow_redirects=False) 返回码为401 登录失败

应该如何解决呢?

错误

错误代码418错误,当前IP地址已被今日校园封禁怎么解决

logic error or not

file: ./login/casLogin.py
line in: 52~64

52:    if self.type == 0:
            salt = soup.select("#pwdDefaultEncryptSalt")
        else:  # self.type = 1
            salt = soup.select("#pwdEncryptSalt")
        if len(salt) != 0:
            salt = salt[0].get('value')
        else:
            pattern = '\"(\w{16})\"'
            salt = re.findall(pattern, html)
            if (len(salt) == 1):
                salt = salt[0]
            else:
64:             salt = False

if (len(salt) == 1):
salt = salt[0]

When setting the value of salt, you can't ensure it if this happened like below.

image

小小吐槽一下

[2021-09-25 01:22:34]
第1个配置出错了
表单未找到你设置的值:36-37.2°c
,你上次系统选的值为:36~37.2℃
`
如果重复运行的话能不能返回“已签到”的形式呢,虽然这并非必要

我在服务器上运行代码没问题,但是用crontab就有问题了

Oct 3 11:59:02 v032f_00385274 CROND[41177]: (root) CMD (python3 /usr/games/fuck/wan/index.py)
Oct 3 11:59:06 v032f_00385274 CROND[41176]: (root) CMDOUT (Traceback (most recent call last):)
Oct 3 11:59:06 v032f_00385274 CROND[41176]: (root) CMDOUT ( File "/usr/games/fuck/wan/index.py", line 101, in )
Oct 3 11:59:06 v032f_00385274 CROND[41176]: (root) CMDOUT ( main())
Oct 3 11:59:06 v032f_00385274 CROND[41176]: (root) CMDOUT ( File "/usr/games/fuck/wan/index.py", line 21, in main)
Oct 3 11:59:06 v032f_00385274 CROND[41176]: (root) CMDOUT ( config = getYmlConfig())
Oct 3 11:59:06 v032f_00385274 CROND[41176]: (root) CMDOUT ( File "/usr/games/fuck/wan/index.py", line 13, in getYmlConfig)
Oct 3 11:59:06 v032f_00385274 CROND[41176]: (root) CMDOUT ( file = open(yaml_file, 'r', encoding="utf-8"))

返回了SUCCESS,但实际并未签到

感谢作者,前段时间正常奔放,今天出现异常
执行的是autoSign任务,在submitForm()后打印返回信息无异常,在APP中查看依旧未签到

res = self.session.post(f'{self.host}wec-counselor-sign-apps/stu/sign/submitSign', headers=headers,
                                data=json.dumps(self.form), verify=False).json()
        print(str(res))
        return res['message']

image

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.