戳上方蓝字“逻辑为金”关注我
importrequests
deffetch_data():
url="https://apphq.longhuvip.com/w1/api/index.php"
headers= {
"Content-Type": "application/x-www-form-urlencoded; charset=utf-8",
"Accept": "*/*",
"User-Agent": "lhb/5.12.3 (com.kaipanla.www; build:0; iOS 16.3.1) Alamofire/5.12.3",
"Accept-Language": "zh-Hans-CN;q=1.0",
"Accept-Encoding": "gzip;q=1.0, compress;q=0.5"
}
data= {
"Index": "2",# 页数
"PhoneOSNew": "2",
"StockID": "605100", #股票代码
"Tur": "100", #委托金额大于等于100万
"Type": "3",
"VOrder": "",
"VType": "1",
"VerSion": "5.12.0.3",
"Vol": "500", #委托量
"a": "GetWeiTuo_W14",
"apiv": "w34",
"c": "StockL2Data",
"st": "50"
}
response=requests.post(url, headers=headers, data=data)
returnresponse.json()
# 使用这个函数来获取数据
data=fetch_data()
print(data)
