Home  >  Q&A  >  body text

Questions about python crawler

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

淡淡烟草味淡淡烟草味2711 days ago618

reply all(1)I'll reply

  • 世界只因有你

    世界只因有你2017-05-18 10:47:11

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

    reply
    0
  • Cancelreply