Selenium-proxy-authentication
Selenium-proxy-authentication copied to clipboard
How can we use this in undetected_chromedriver?
I am trying to use this exact same method with undetected chromedriver but it's not using the proxy.
Could you provide a script that shows how you're trying to implement it?
Could you provide a script that shows how you're trying to implement it?
i get same problem
import time
import undetected_chromedriver as uc
from extension import proxies
proxy_ip = "rp.proxyscrape.com"
proxy_port = "6060"
proxy_username = "***"
proxy_password = "***"
chrome_options = uc.ChromeOptions()
proxies_extension = proxies(proxy_username, proxy_password, proxy_ip, proxy_port)
chrome_options.add_extension(proxies_extension)
# chrome_options.add_argument("--headless=new")
# chrome_options.add_experimental_option("excludeSwitches", ["enable-automation"])
# chrome_options.add_argument('--proxy-server=http://{}:{}'.format(proxy_ip, proxy_port))
driver =uc.Chrome(options=chrome_options)
driver.get('https://antoinevastel.com/bots/')
input()
driver.quit()
I have already solved the problem
chrome_options = uc.ChromeOptions()
proxies_extension = proxies(proxy_username, proxy_password, proxy_ip, proxy_port)
with zipfile.ZipFile(proxies_extension, 'r') as zip_ref:
zip_ref.extractall("proxies_extension")
chrome_options.add_argument(f'--load-extension={os.path.dirname(os.path.abspath(sys.argv[0]))}/proxies_extension')
@LINKlang Glad you solved it!
Can it work in centos7?
@RIP-GitHub Since CentOS7 has reached it's EOL, we wouldn't recommend to use it in production environments. However, so long as the necessary dependencies are in place, you should be able to make use of undetected_chromedriver. Here are a few examples you should note: Chrome and Chromedriver versions that still support CentOS7; Python 3.x since CentOS7 ships with Python 2.7 by default; glibc, libnss3, and libx11 libraries for CentOS7.
We do not currently have a guide, but you're welcome to have a go with our free trial as well as 14-day money back guarantee. More information can be found here.