Selenium-proxy-authentication icon indicating copy to clipboard operation
Selenium-proxy-authentication copied to clipboard

How can we use this in undetected_chromedriver?

Open StillNoob opened this issue 1 year ago • 6 comments

I am trying to use this exact same method with undetected chromedriver but it's not using the proxy.

StillNoob avatar Dec 26 '23 07:12 StillNoob

Could you provide a script that shows how you're trying to implement it?

sakanamk avatar Jun 21 '24 12:06 sakanamk

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()

LINKlang avatar Aug 24 '24 08:08 LINKlang

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 avatar Aug 24 '24 08:08 LINKlang

@LINKlang Glad you solved it!

NoahDrucker avatar Aug 27 '24 10:08 NoahDrucker

Can it work in centos7?

RIP-GitHub avatar Sep 18 '24 10:09 RIP-GitHub

@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.

MindaugasSP avatar Sep 18 '24 12:09 MindaugasSP