seleniumbase / SeleniumBase

📊 Python's all-in-one framework for web crawling, scraping, testing, and reporting. Supports pytest. UC Mode provides stealth. Includes many tools.
https://seleniumbase.io
MIT License
4.45k stars 908 forks source link

Proxy and wire #2819

Closed kitsune0n closed 1 month ago

kitsune0n commented 1 month ago

By this manual when trying add flag user_wire=True in my python code and sb.set_wire_proxy(proxy_string) ip don't changed. And as alternative trying use proxy= . tha's works and ip changed but after few minutes have popup with auth required for proxy

mdmintz commented 1 month ago

These are the docs you're looking for: https://github.com/seleniumbase/SeleniumBase/issues/2145

For changing the proxy in Wire Mode (wire=True / --wire):

driver.set_wire_proxy(string)

Where the proxy string formats are: host:port or user:pass@host:port.

You can also change the proxy without Wire Mode by using proxy="string" / --proxy="string".

Also, duplicate of https://github.com/seleniumbase/SeleniumBase/issues/1807#issuecomment-1472800048

kitsune0n commented 1 month ago

can i use UC mode with wire proxy ? or selenium-stealth with wire proxy ? when i try use uc and proxy= . tha's works and ip changed but after few minutes have popup with auth required for proxy

These are the docs you're looking for: #2145

For changing the proxy in Wire Mode (wire=True / --wire):

driver.set_wire_proxy(string)

Where the proxy string formats are: host:port or user:pass@host:port.

You can also change the proxy without Wire Mode by using proxy="string" / --proxy="string".

Also, duplicate of #1807 (comment)

kitsune0n commented 1 month ago

@mdmintz when using uc=True, proxy=proxy_string proxy in format username:password@ip:port have this popup Screenshot 2024-06-02 021258 butt if i check proxy in this session by google, it works

mdmintz commented 1 month ago

You can't combine Wire Mode with UC Mode: https://github.com/seleniumbase/SeleniumBase/issues/2145#issuecomment-1788890241.

As for UC Mode and Proxy Mode, it works for me. Not sure what you're doing. Maybe you gave it a bad proxy or the username/password was invalid.