网页抓取
2021-03-04 23:29
标签:port tor ajax else ashx ble request index break 网页抓取 标签:port tor ajax else ashx ble request index break 原文地址:https://www.cnblogs.com/jestin/p/12910949.htmlimport requests
import json
page=1
while True:
url=‘http://www.kfc.com.cn/kfccda/ashx/GetStoreList.ashx?op=cname‘
data={
‘cname‘:‘广州‘,
‘pageIndex‘: page,
}
response=requests.post(url,data=data)
print(response.json())
if response.json().get(‘Table1‘,‘‘):
page =page+1
else:
break
Ajax网页抓取