search

Home  >  Q&A  >  body text

python爬取页面时,一个URL无法访问导致报错,然后跳过这个报错继续抓取?

1.抓取到一个错误的URl

2.我的比蠢笨的办法:


黄舟黄舟2903 days ago578

reply all(1)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-04-18 10:23:58

    There is a header in curl that can be set to return. If the data obtained is not in 200 status, just skip the processing.

    reply
    0
  • Cancelreply