赞
踩
https://id.kuaishou.com/pass/kuaishou/sms/requestMobileCode
参数:
直接curl生成python代码去测试一下:
# -*- coding: utf-8 -*-
# @Author : Codeooo
# @Time : 2021/10/11
import requests
headers = {
'Connection': 'keep-alive',
'Pragma': 'no-cache',
'Cache-Control': 'no-cache',
'sec-ch-ua': '"Chromium";v="92", " Not A;Brand";v="99", "Google Chrome";v="92"',
'sec-ch-ua-mobile': '?0',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36',
'Content-type': 'application/x-www-form-urlencoded',
'Accept': '*/*',
'Origin': 'https://www.kuaishou.com',
'Sec-Fetch-Site': 'same-site',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Dest': 'empty',
'Referer': 'https://www.kuaishou.com/',
'Accept-Language': 'zh-CN,zh;q=0.9',
}
data = {
'sid': 'kuaishou.server.web',
'type': '53',
'countryCode': '+86',
'phone': '18888888888',
'account': '',
'ztIdentityVerificationType': '',
'ztIdentityVerificationCheckToken': ''
}
response = requests.post('https://id.kuaishou.com/pass/kuaishou/sms/requestMobileCode', headers=headers, data=data)
print(response.text)
print(response.status_code)
登录包mobileCode:
https://id.kuaishou.com/pass/kuaishou/login/mobileCode
参数:
countryCode: +86
phone: 18888888888
sid: kuaishou.server.web
createId: true
smsCode: 820644
包含userId,passToken,kuaishou.server.web_st,kuaishou.server.web.at 等,后续几章会说明这几个值得用法。
继续生成python代码测试一下:
# -*- coding: utf-8 -*-
# @Author : Codeooo
# @Time : 2021/10/11
import requests
headers = {
'Connection': 'keep-alive',
'Pragma': 'no-cache',
'Cache-Control': 'no-cache',
'sec-ch-ua': '"Chromium";v="92", " Not A;Brand";v="99", "Google Chrome";v="92"',
'sec-ch-ua-mobile': '?0',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36',
'Content-type': 'application/x-www-form-urlencoded',
'Accept': '*/*',
'Origin': 'https://www.kuaishou.com',
'Sec-Fetch-Site': 'same-site',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Dest': 'empty',
'Referer': 'https://www.kuaishou.com/',
'Accept-Language': 'zh-CN,zh;q=0.9',
}
data = {
'countryCode': '+86',
'phone': '18888888888',
'sid': 'kuaishou.server.web',
'createId': 'true',
'smsCode': '634709'
}
response = requests.post('https://id.kuaishou.com/pass/kuaishou/login/mobileCode', headers=headers, data=data)
print(response.text)
print(response.status_code)
print(response.cookies.get_dict())
did, userId,passToken,kuaishou.server.web_st 等后续需要提交的参数全部生成了。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。