给scrapy中的请求添加代理

不用中间件的话,在请求中加meta = {‘proxy’ : ‘http://172.0.0.1:8634’}

yield scrapy.Request(url=‘http://httpbin.org/get’,meta = {‘proxy’ : ‘http://172.0.0.1:8634’} ,callback = self.parse)

猜你喜欢

转载自blog.csdn.net/weixin_43751840/article/details/88826235