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

about proxy support #40

Open
free01man opened this issue Jun 13, 2019 · 9 comments
Open

about proxy support #40

free01man opened this issue Jun 13, 2019 · 9 comments
Labels
enhancement New feature or request

Comments

@free01man
Copy link

Good day! Whether there was any solution in support of proxy servers after all? Unfortunately, the standard expression request.meta['proxy'] does not work with SeleniumRequest. Dear zhangtemplar apparently also failed to finalize this point, as i see. With respect to you...

@clemfromspace clemfromspace added the enhancement New feature or request label Nov 13, 2019
@demisx
Copy link

demisx commented Apr 22, 2020

Is my understanding correct that there is no proxy support in "scrapy-selenium" and each request will expose the real IP?

@free01man
Copy link
Author

yep

@anibal-aguila
Copy link

As mentioned @free01man and the work of @zhangtemplar
scrapy-selenium can be a wonderful tool with this feature, specially in combination with: scrapy-rotating-proxies

https://github.com/TeamHG-Memex/scrapy-rotating-proxies

@mustfkeskin
Copy link

Any progress here

@tuanaldo
Copy link

tuanaldo commented Dec 3, 2020

Commenting to keep updated

@psdon
Copy link

psdon commented Feb 24, 2021

any updates?

@michhri
Copy link

michhri commented Mar 3, 2021

While not a completly satisfactory solution, you can pass the proxy address to the webdriver as an option.
e.g. in your settings:

DOWNLOADER_MIDDLEWARES['scrapy_selenium.SeleniumMiddleware'] = 800
SELENIUM_DRIVER_NAME = 'chrome'
SELENIUM_DRIVER_EXECUTABLE_PATH = which('chromedriver')
SELENIUM_DRIVER_ARGUMENTS = ['--headless', '--proxy-server=http://127.0.0.1:8118']

Verify that the proxy is working by doing a request to an IP service e.g.

SeleniumRequest(url='http://ifconfig.me/ip')

and check the Response.text for the IP address.

This workaround works for a single, static proxy only.
This may be useful if you are using privoxy with tor or do not wish to rotate the proxy IP's, it won't work with proxy rotation middlewares like scrapy-rotating-proxy.
If you need it to work with another middleware, clone the repo and modify it.

@ait1ispring
Copy link

As mentioned @free01man and the work of @zhangtemplar
scrapy-selenium can be a wonderful tool with this feature, specially in combination with: scrapy-rotating-proxies

https://github.com/TeamHG-Memex/scrapy-rotating-proxies

Hi, I am using the scrapy-rotating-proxies at the same time, but I am not sure is it really hide my REAL IP? Any evidence that you can show that is really hide your REAL IP? Thank you.

@zhiming429438709
Copy link

What about with auth

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

No branches or pull requests

10 participants