I use post to crawl web form data. The website is as follows: http://www.ipe.org.cn/Industr.... Now I have encountered two problems. One of them is the violation type <input type= "checkbox" name="violation" data-role="all" checked="" value="0">, the webpage has been set to checked and has a default value, and I only want the data with violation=1 , I don’t know what to do
The second problem is in the process of selecting country, province and city<select class="select" name="select" id="country_0" onchange="setProvince_0();"> I cannot directly use name and value to select the form data I want
Kneel down and ask the great gods for answers
It has an API to return data. You can grab it and click on the filtered data stream. Probably this api, http://www.ipe.org.cn/data_as..., in post mode, there is a parameter called itemType, which is the violation type you want.
Then the corresponding country, province, city and other information are reflected in the API, you can find out by yourself. Then according to the requirements, construct the data you need to request, and the rest is parsing. . . .