Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working with scrapy-splash #38

Open
fanchangyong opened this issue Jan 5, 2018 · 3 comments
Open

Not working with scrapy-splash #38

fanchangyong opened this issue Jan 5, 2018 · 3 comments

Comments

@fanchangyong
Copy link

I'm using scrapy-splash to crawl an ajax site. And when using scrapy-proxies, it seems that the request is not sending through the proxy, the proxy is not working at all.

@NullYing
Copy link

                lua_script = """
                    function main(splash, args)
                      assert(splash:go{splash.args.url,http_method=splash.args.http_method,body=splash.args.body})
                      assert(splash:wait(0.5))
                
                      splash:on_request(function(request)
                          request:set_proxy{
                              host = "http://%s",
                              port = %s
                          }
                      end)
                
                      return splash:html()
                    end
                    """ % (proxy_ip, proxy_port)
                yield SplashRequest(shop_url, callback=self.parse_content,
                                    headers={'Referer:': response.url},
                                    endpoint='execute',
                                    args={'lua_source': lua_script})

@pierre-rbs
Copy link

I'm using scrapy-splash to crawl an ajax site. And when using scrapy-proxies, it seems that the request is not sending through the proxy, the proxy is not working at all.

Do you have a working solution ? I have the same problem and do not know how to do

@fanchangyong
Copy link
Author

@Pierrorobis No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants