好友
阅读权限10
听众
最后登录1970-1-1
|
重新学了下抓包和requests,刚好京东的活动来了。就是技术很菜,只能做出来这样需要的可以在青龙面板上新建导入,每个小时执行一次就可以了鞭炮再小也是肉有没有大佬能解答京东的火爆咋个处理呢?
import requests
import re
class jd:
list = ["pt_key=XXX;pt_pin=XXX",]#这里输入cookie,有几个输入几个
# 获取一些post需要的数据数据
def home(self):
data = {
"functionId": "tigernian_getHomeData",
"body": {},
"client": "wh5",
"clientVersion": "1.0.0",
}
response = requests.post("https://api.m.jd.com/client.action?functionId=tigernian_getHomeData",
headers=self.header, data=data)
patter = 'secretp":"(.*?)"'
secretp = re.compile(patter).findall(response.text)
# print(secretp)
print(response.text)
# 签到获取鞭炮
self.nian_collect(secretp)
# 互助的,能抓包,互助就是火爆
# self.nian_help(secretp)
# 签到获取鞭炮
def nian_collect(self, secretp):
collectAutoScore_data = {
"functionId": "tigernian_collectAutoScore",
"body": {
"{\"ss\":\"{\\\"extraData\\\":{\\\"log\\\":\\\"1641776236526~1HfBfnuLKDbMDFxUElPczAxMQ==.QGZ9fkRGZnt+RkNofjEBQGMaejhCJQZ5DUB8fmNKXWE3fQ1ALj0MJxwBJh0HJgAidychBzw8HBw4DCwiDw==.e3c4d89b~9,1~067984678BCB81FC2ABBEF2B397F0F18BB8358AF~1yk8ncv~C~ThFBWhINbD4eFRVeWRQKbhVVBh8GZhl1dht5T0cbFRIYFFQAGgQCHgxqGXYADxsCHkNDHBZSBxgCBBsLbB90BHcbVk9GFTwcFlFCWxULBR4XQEYVChUGVQYGVgcCBAIEBAcCBgIBDRUcFUAGVhVbEkBCREFRV0JUFx8XQFVWFVkQUQdEQENEQFYTGxBFV1sVCmwOTwEDWBwGGgMZBB0GbxkRX10SDQZPEFQSEg4UB1YCAFMCVAABBQYHAlYEUlAHUVVSBgQJBgYGUFQEUw4VTxBZERIOFHxcWURPElRBWEEHWxVPEENDCgUABAQABgEABgUABQYbFQlZFVsSVRQcF1FBVRAPEUF0ZFpmDGBDNmBfDmRlYEREXVhbcFRhFRtBXEFDChZxX1pQXVISfF1WGRIbFQ1TQUMKFg4IDQIDFR4XQFZFEg1sWgMCTQQFBG0ZFUNYEA9oF1YSGxUCEBtDURYaElQVHRVTFx8XVhIbFQIQak0SXVlRFw0TUVRTVVNRREMVTxBWCxIOFEUXGxNUWxcJF0ADGQNNAhVNEldQb0MVCxUCBBEZFVJTFVkQRQBeUFldCAEDDgMNBwECEhsVDlgVW2sFGgAZB2wbEFdfWlASDRUCEBtDXUdREg8VUBVP~01nabve\\\",\\\"sceneid\\\":\\\"ZNShPageh5\\\"},\\\"secretp\\\":\\\"" + str(
secretp) + "\\\",\\\"random\\\":\\\"62918445\\\"}\"}"
},
"client": "wh5",
"clientVersion": "1.0.0",
}
response = requests.post("https://api.m.jd.com/client.action?functionId=tigernian_collectAutoScore",
headers=self.header, data=collectAutoScore_data)
print(response.text)
# 年兽互助
def nian_help(self, secretp):
collectAutoScore_data = {
"functionId": "tigernian_collectScore",
"body": {
"{\"ss\":\"{\\\"extraData\\\":{\\\"log\\\":\\\"1641803110744~1NKS1TI9XJ5MDFocWxvQzAxMQ%3D%3D.WUdYXntYQl1fdlpGWREpXUMfABAuPFVaPVldW0N6REASXT1ZDwMhLT43NFYwXRkvJzc9IDomAg8kCwsSVUwS.74272e26~9%2C1~4860683BF67DEF83E1BD773FACB07741C68A9F2C~1ggv2cy~C~TxVDCBMMa2pNF0NWWRAPbEdQAhpTdBp0Yk0BY3MYAxsHVQQbQ0cdFFQATANyFHBnGQMwdxsGSwEGABsVFxsaUAMYASAYc2FJBWBjGxQZQxppHhdQF1oVDVQdFENEQw8VCQIGBA9VBwYHUQkPBANTAgUaGBBCUgEWDRURRUJEQwdAURoYEEJSBBYNFQNXQkRDFUBWGhgQRVMLFg1sXB0CABtTGQQUBR4AakkWXV1HCwccFQJGFQIWUAFUBwBTUwdTVQUCWAZVDFUADA9VUQUDAwEOUVJVVlEaGBBbR0cOFXsMX0NIFwBURVtcBAEVSRZDF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\\\",\\\"sceneid\\\":\\\"ZNSZLh7\\\"},\\\"secretp\\\":\\\"" + str(
secretp) + "\\\",\\\"random\\\":\\\"10101149\\\"}\",'inviteId':'ZXASTT022vP13RRkZ9F3SPRv3kP8OcAFjRWn6W7zB55awQ',}"
},
"client": "wh5",
"clientVersion": "1.0.0",
}
response = requests.post("https://api.m.jd.com/client.action?functionId=tigernian_collectScore",
headers=self.header, data=collectAutoScore_data)
print(response.text)
def __init__(self):
for i in range(len(self.list)): #设置请求头
self.header = {
'Host': 'api.m.jd.com',
'Connection': 'keep-alive',
'Content-Type': 'application/x-www-form-urlencoded',
'user-agent': 'jdapp;android;10.0.6;11;9363537336739353-2636733333439346;network/wifi;model/KB2000;addressid/138121554;aid/9657c795bc73349d;oaid/;osVer/30;appBuild/88852;partner/oppo;eufv/1;jdSupportDarkMode/0;Mozilla/5.0 (Linux; Android 11; KB2000 Build/RP1A.201005.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045537 Mobile Safari/537.36',
"Cookie": str(self.list)
}
self.home()
jd() |
免费评分
-
查看全部评分
|
发帖前要善用【论坛搜索】功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。 |
|
|
|
|