用scrapy爬取知乎的时候 报错: 403 HTTP status code is not handled or not allowed
替换setting.py的默认headers无效, 直接使用User_Agent无效, 在中间件中 指定UA中间件无效
解决:
在setting.py里面加入: HTTPERROR_ALLOWED_CODES = [403]
用scrapy爬取知乎的时候 报错: 403 HTTP status code is not handled or not allowed
替换setting.py的默认headers无效, 直接使用User_Agent无效, 在中间件中 指定UA中间件无效
解决:
在setting.py里面加入: HTTPERROR_ALLOWED_CODES = [403]