我使用 Tor 来爬取网页。 我启动了 Tor 和 Polipo 服务,并添加了
class ProxyMiddleware(object): # overwrite process request def
process_request(self, request, spider):
# Set the location of the proxy
request.meta['proxy'] = "127.0.0.1:8123"
现在,我该如何确保Scrapy在请求时使用不同的IP地址?