抓取数据时候,请求成功,但是数据好像不对;
import requests
import json
url = "https://zjj.sz.gov.cn/zfxx/bzflh/lhmc/getLhmcList"
data={'parameter1':'12345','parameter2':'23456'}
#data=json.dumps(data)
headers = {
'Host':'zjj.sz.gov.cn',
'Origin':'https://zjj.sz.gov.cn',
'Referer':'https://zjj.sz.gov.cn/zfxx/bzflh/?path=main/%27,
'User-Agent':'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36'
}
response = requests.post(url, headers=headers, json = data)
print(response.json())
print(response)
{'code': 0, 'data': None, 'msg': 'ok', 'path': None, 'extra': None, 'timestamp': '1658302401722', 'isSuccess': True, 'isError': False}
<Response [200]>