scrapy抓取网页返回的是404页面应该怎么做?
http://www.example.com/artiles/1
http://www.example.com/artiles/2
...
...
...
http://www.example.com/artile...
比如要抓取上面共20页的内容,些第2页面不存在,返回的是404页面,
然后scrapy就停止了### 问题描述
问题出现的环境背景及自己尝试过哪些方法
相关代码
http://www.example.com/artiles/1
http://www.example.com/artiles/2
...
...
...
http://www.example.com/artile...
你期待的结果是什么?实际看到的错误信息又是什么?
如何解决停止问题
你可以尝试使用 try 和expect 抛出异常,然后就可以跳过这个404的网址。