I trying to use proxy with splash, so according to documentation I can do this with "on_request" callback and request.set_proxy, but when I go to https://httpbin.org/ip I still see my IP, not the proxy IP.
The lua source is:
function main(splash, args)
splash:on_request(function(request)
request.set_proxy{"proxy.crawlera.com", 8011, username = "xxxxxxxxxx", password = "", type = "HTTP"}
end)
assert(splash:go(args.url))
assert(splash:wait(5.0))
return {
png = splash:png(),
har = splash:har(),
}
end
I got this error in the splash container:
I am not sure why it complaints set_proxy require 2 positional arguments, since I already give it all required arguments. Am I missing something?
I trying to use proxy with splash, so according to documentation I can do this with "on_request" callback and
request.set_proxy
, but when I go to https://httpbin.org/ip I still see my IP, not the proxy IP.The lua source is:
I got this error in the splash container:![Screenshot from 2021-10-02 19-32-42](https://user-images.githubusercontent.com/2830977/135716498-2ff70a0d-2792-4901-b7ab-e8aeb38875e6.png)
I am not sure why it complaints
set_proxy
require 2 positional arguments, since I already give it all required arguments. Am I missing something?Splash version: 3.5