Questions about python crawler
淡淡烟草味
淡淡烟草味 2017-05-18 10:45:11
0
1
543

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

淡淡烟草味
淡淡烟草味

reply all(1)
世界只因有你

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. . . .

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!