Giter Site home page Giter Site logo

不能正常运行 about shu-selfreport HOT 13 CLOSED

bluefisher avatar bluefisher commented on August 17, 2024 1
不能正常运行

from shu-selfreport.

Comments (13)

BlueFisher avatar BlueFisher commented on August 17, 2024 5

正在处理中...

from shu-selfreport.

BlueFisher avatar BlueFisher commented on August 17, 2024 1

登陆系统改动了,暂时没有办法通过requests来模拟chrome中的登录,不知道哪里有限制,有大佬能成功登录吗

from shu-selfreport.

Haolan-Zhang avatar Haolan-Zhang commented on August 17, 2024

很奇怪,我用树莓派和iPhone跑程序就可以登录,但是用电脑就不行

from shu-selfreport.

Haolan-Zhang avatar Haolan-Zhang commented on August 17, 2024

image
会是这个多出来的parameter搞的鬼吗

from shu-selfreport.

Haolan-Zhang avatar Haolan-Zhang commented on August 17, 2024

问题已解决!!可以在访问selfreport.shu.edu.cn返回的网址中取到这个state,然后再访问图中这个url的时候把parameter的state改成取到的state即可!

from shu-selfreport.

BlueFisher avatar BlueFisher commented on August 17, 2024

@Lanszhang131 我尝试了一下还是不行,你把你的代码pull request一下?

from shu-selfreport.

Haolan-Zhang avatar Haolan-Zhang commented on August 17, 2024

不好意思我之前没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.

BlueFisher avatar BlueFisher commented on August 17, 2024

OK,已修复1ee5811
十分感谢

from shu-selfreport.

amluckydave avatar amluckydave commented on August 17, 2024

@BlueFisher config.yaml里面的账号密码可以用啊。是泄露了吗?如果是,还是赶快删除吧

from shu-selfreport.

BlueFisher avatar BlueFisher commented on August 17, 2024

**了**了...

from shu-selfreport.

MJT-Arthas avatar MJT-Arthas commented on August 17, 2024

目前我是用js写的一个后台,然后前端用了微信小程序一键填报。但是js在获取cookie时候遇到了问题,目前采用的还是模拟表单填写的傻瓜方式,不知道能否交流一下?

from shu-selfreport.

BlueFisher avatar BlueFisher commented on August 17, 2024

@MJT-Arthas nodejs里应该也有像python requests一样的包吧,基本都差不多的,发送http请求就行了

from shu-selfreport.

MJT-Arthas avatar MJT-Arthas commented on August 17, 2024

我是环化的 我的V 787408654 希望拥有个好友位

from shu-selfreport.

Related Issues (20)

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.