java post 注册_使用post request python注册帐户

我正在尝试使用请求发布在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错误 . 我怎么解决这个问题?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值