authentication - 无法使用 Python 请求模块登录 PSN
问题描述
我正在尝试使用从浏览器的检查元素获取的 python 请求模块和 API登录 PSN https://www.playstation.com/en-in/sign-in-and-connect/ 。下面是代码
import requests
login_data = {
'password': "mypasswordhere",
'username': "myemailhere",
}
header = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36'
}
with requests.Session() as s1:
url = "https://auth.api.sonyentertainmentnetwork.com/2.0/oauth/token"
r = s1.post(url, data = login_data, headers = header)
print(r.text)
有了这个,我得到了来自服务器的以下响应。
{"error":"invalid_client","error_description":"Bad client credentials","error_code":4102,"docs":"https://auth.api.sonyentertainmentnetwork.com/docs/","parameters":[]}
我可以知道其他登录 PSN 网络的方法吗?最好使用 API 模型而不是硒?我的目标是使用我的凭据登录 PSN 网络并更改密码,但似乎只卡在登录页面...
解决方案
推荐阅读
- swift - 如何使用 geofirestore 获取查询 firestore 并快速获取文档
- javascript - node stripe products list return empty
- javascript - 工厂函数中的“This”
- web-scraping - 网络从汤文件中抓取相关信息
- python - Django 模型字段包含奇怪的属性 _("private")
- reactjs - React Router - Route children 和 component props 有什么区别
- java - 如何将大型 JSON 字符串转换为 JSON 对象?
- flutter - 颤振溢出圆圈头像覆盖容器
- html - 如何使用 sed 将 CSS 样式文件内联到 HTML 文件?
- r - 从后验预测分布抽样(stan vs inla)