我正在尝试使用请求发布在soundcloud中注册 . 我在网络标签中找到了一个帖子请求 . 这是页面信息 .
这是“一般”
Request URL:https://sign-in.soundcloud.com/sign-up/email?
client_id=02gUJC0hH2ct1EGOcYXQIzRFU91c72Ea&app_version=1463149317
Request Method:POST
Status Code:201 Created
Remote Address:72.21.91.127:443
这是在“响应 Headers ”下
Access-Control-Allow-Headers:Authorization, Content-Type, Device-Locale
Access-Control-Allow-Methods:GET, POST, PUT, DELETE
Access-Control-Allow-Origin:https://soundcloud.com
Access-Control-Expose-Headers:Date
Access-Control-Max-Age:1728000
Content-Encoding:gzip
Content-Length:142
Content-Type:application/json;charset=utf-8
Date:Tue, 17 May 2016 07:17:42 GMT
Server:am/2
Vary:Origin
这是在“请求 Headers ”下
Accept:application/json, text/javascript, */*; q=0.1
Accept-Encoding:gzip, deflate
Accept-Language:en-US,en;q=0.8
Connection:keep-alive
Content-Length:294
Content-Type:application/json
Host:sign-in.soundcloud.com
Origin:https://soundcloud.com
Referer:https://soundcloud.com/
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.86 Safari/537.36
这是 Payload
{"scope":"fast-connect non-expiring purchase signup upload","client_id":"02gUJC0hH2ct1EGOcYXQIzRFU91c72Ea","email_sign_up_token":"dd33851c6df06a3c77f8e1d143e24b90b3a39fc7","recaptcha_response":"","email":"email@gmail.com","password":"password","date_of_birth":{"month":5,"year":2000}}
所以我要做的就是使用该url通过我的脚本在soundcloud上注册 . 我不知道如何使用有效载荷数据 . 我试过我通常尝试的东西
data = {'email':'email','password':'password'}
url = 'https://sign-in.soundcloud.com/sign-up/email?client_id=02gUJC0hH2ct1EGOcYXQIzRFU91c72Ea&app_version=1463149317'
response = requests.post(url,data=data)
print response
这给我带来400错误 . 我怎么解决这个问题?