I\'m trying to use proxy (proxymesh) alongside scrapy-splash. I have following (relevant) code
PROXY = \"\"\"splash:on_request(function(request) request:
You should add 'proxy' argument to SplashRequest object.
def start_requests(self): for url in self.start_urls: print url yield SplashRequest(url, self.parse, endpoint='execute', args={'wait': 5, 'lua_source': PROXY, 'js_source': 'document.body', 'proxy': 'http://proxy_ip:proxy_port'}