请问这个微信小程序的信息应该如何爬取?
请问这个微信小程序的信息应该如何爬取?
通过reqable找到了涉及到内容的URL,但是通过requests爬不到从reqable看的信息。
import requests
url = 'https://crm.daishuaj.com/paipaiwuapi/weixin/getHouseList?access_token=&open_id=oExiB5ZqiZt7o6fPtUwe1_XSwAlc'
json_data = requests.get(url=url).json()
print(json_data)
=====================================================
更新
按照最佳答案在小程序全选了拍卖状态。
找到了对应的请求体
按照请求体更新了下代码
url = "https://crm.daishuaj.com/paipaiwuapi/weixin/getHouseList?access_token=&open_id=openId"
payload = json.dumps({
"pageSize": 10,
"pageNum": 1,
"searchType": "ALL",
"searchModel": {
"mainActiveIndex": "",
"maxRegionId": "",
"minRegionId": "",
"piceType": [],
"piceTypeStart": "",
"piceTypeEnd": "",
"floorageList": [],
"loopLineList": [],
"auctionStatusList": [],
"taxationList": [],
"auctionTypeList": [{
"type": "JJKS"
},
{
"type": "ZZPM"
},
{
"type": "YJS"
},
{
"type": "YCH"
},
{
"type": "YZZ"
}
],
"moneyBindList": [],
"trackTrafficList": [],
"signUpNumList": [],
"biddingNumList": [],
"moneyStart": "",
"moneyEnd": "",
"sortType": ""
}
})
headers = {
'Content-Type': 'application/json',
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
结果只得到了空的list。
{“code”:200,”msg”:”Success”,”datas”:{“pageSize”:10,”list”:[],”pageNum”:1}}