密码检查器不起作用

时间:2017-05-31 11:00:12

标签: python python-3.x ipython

import requests

with requests.Session() as c:
    url = "https://www.roblox.com/newlogin"
    UserName = input("Your username is > ")
    PassWord = input("Your password is > ")
    c.get(url)
    login_data = dict(username = UserName, password = PassWord, next='/')
    r = c.post(url, data=login_data, headers={"Referer":"https://www.roblox.com/newlogin"})
if r.headers.status_code == 302:
    print("Successfully logged in")
else:
    print("Invalid username or password")

这是我的代码,它应该检查用户名和密码是否正确,出于某种原因,当我输入真实密码和真实用户名时,它仍会打印("Invalid username or password"),我该怎么办?< / p>

0 个答案:

没有答案