Comments (13)
正在处理中...
from shu-selfreport.
登陆系统改动了,暂时没有办法通过requests来模拟chrome中的登录,不知道哪里有限制,有大佬能成功登录吗
from shu-selfreport.
很奇怪,我用树莓派和iPhone跑程序就可以登录,但是用电脑就不行
from shu-selfreport.
from shu-selfreport.
问题已解决!!可以在访问selfreport.shu.edu.cn返回的网址中取到这个state,然后再访问图中这个url的时候把parameter的state改成取到的state即可!
from shu-selfreport.
@Lanszhang131 我尝试了一下还是不行,你把你的代码pull request一下?
from shu-selfreport.
不好意思我之前没folk你的代码,不太熟悉你代码里的模块,我按照自己的代码在你的代码的登录模块上改了一下,你看一下吧
import base64
def login(username, password):
sess = requests.Session()
while True:
try:
r = sess.get('https://selfreport.shu.edu.cn')
code = r.url.split('/')[-1]
url_param = eval(base64.b64decode(code).decode("utf-8"))
state = url_param['state']
sess.post(r.url, data={
'username': username,
'password': password
})
sess.get(f"https://newsso.shu.edu.cn/oauth/authorize?client_id=WUHWfrntnWYHZfzQ5QvXUCVy&response_type=code&scope=1&redirect_uri=https%3A%2F%2Fselfreport.shu.edu.cn%2FLoginSSO.aspx%3FReturnUrl%3D%252f&state={state}")
except Exception as e:
print(e)
continue
break
from shu-selfreport.
OK,已修复1ee5811
十分感谢
from shu-selfreport.
@BlueFisher config.yaml里面的账号密码可以用啊。是泄露了吗?如果是,还是赶快删除吧
from shu-selfreport.
**了**了...
from shu-selfreport.
目前我是用js写的一个后台,然后前端用了微信小程序一键填报。但是js在获取cookie时候遇到了问题,目前采用的还是模拟表单填写的傻瓜方式,不知道能否交流一下?
from shu-selfreport.
@MJT-Arthas nodejs里应该也有像python requests一样的包吧,基本都差不多的,发送http请求就行了
from shu-selfreport.
我是环化的 我的V 787408654 希望拥有个好友位
from shu-selfreport.
Related Issues (20)
- 21-11-04变更 HOT 1
- 是不是只能报在学校的? HOT 5
- 每日两报会刷掉更新的内容 HOT 1
- 关于***错误 HOT 1
- 服务器上运行报错 HOT 2
- 已初步证实每日一报对GitHub的ip段进行了屏蔽
- 一个看不懂的运行错误 HOT 1
- 如何一键补报? HOT 3
- 连接VPN失败,如何解决? HOT 2
- 服务器无法登陆 HOT 2
- 设立一个海外版吧 HOT 4
- 建议把填报时间改成一定时间内随机 HOT 1
- 在上海回家后填报不上 HOT 2
- 随申码 HOT 3
- 如果支持Docker就更好了 HOT 4
- 文档依赖不全 HOT 3
- 关于每日一报发生变化的问题 HOT 2
- 现在好像每天要上传***,自动报不成功了 HOT 1
- 在直接填报失败的情况下, OpenVPN一直无法成功连接. HOT 3
- 补报前10天的内容,应该如何操作?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shu-selfreport.