本帖最后由 fengxi 于 2019-12-18 15:43 编辑
排版不是很好...请见谅
打开抓包软件,找到提交的这个链接:
我们可以看到它的手机是加密的,把加密的值放到脚本里 (求大佬分析分析加密的算法)
获取到它的cookie放到脚本内
[Python] 纯文本查看 复制代码
import requests as req
from concurrent.futures import ThreadPoolExecutor
def lt(code):
data = {
"encryptMobile":"你联通的加密手机号",
"invitationCode":f"{code['code']}"
}
header ={
"User-Agent": "Mozilla/5.0 (Linux; Android 5.1.1; SM-G925F Build/LMY48Z; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/52.0.2743.100 Safari/537.36; unicom{version:android@6.0201,desmobile:13066323169};devicetype{deviceBrand:samsung,deviceModel:SM-G925F,systemVersion:dis}",
"Cookie": "你联通的cookie"
}
url = 'https://m.client.10010.com/DoubleCard_Pro/static/doubleCard/actFriendHelp'
res = req.post(url,headers=header,data=data)
if "助力成功" in res.text:
print(res.text)
def get_data():
data = {"limit":500,"offset":i*1}
header ={
"User-Agent": "Mozilla/5.0 (Linux; Android 5.1.1; SM-G925F Build/LMY48Z; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/52.0.2743.100 Safari/537.36; unicom{version:android@6.0201,desmobile:13066323169};devicetype{deviceBrand:samsung,deviceModel:SM-G925F,systemVersion:dis}",
}
url = "http://yoouu.cn:3000/get-code"
result = req.post(url,headers=header,data=data)
code_data = result.json()['data']['rows']
the = ThreadPoolExecutor(max_workers=15)
for i in the.map(lt,code_data):
pass
get_data()
|