search

Home  >  Q&A  >  body text

python - 爬虫在爬取网页的时候出现了302要如何解决?

在抓取360问答的时候,前面抓取得好好的,但是每次抓到大约40条的时候,就打不开了,所有的问题都打不开了,直接全部跳转到首页!我抓包了看了下,是被302了,请问下,除了换ip,还有什么比较好的方法来突破这种限制?

我设置了时间间隔,现在也不行了

ringa_leeringa_lee2881 days ago888

reply all(3)I'll reply

  • 高洛峰

    高洛峰2017-04-18 09:50:26

    sleep(10)
    Pause, don’t climb too fast~

    reply
    0
  • 迷茫

    迷茫2017-04-18 09:50:26

    Floor 1 is right, set the crawl delay

    reply
    0
  • 阿神

    阿神2017-04-18 09:50:26

    The simple solution is to use an agent.

    Setting the time interval is generally not very useful. In the case of large-scale crawling, if an IP is accessed hundreds of times, the verification code will usually be redirected.

    reply
    0
  • Cancelreply