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

How can we use this in undetected_chromedriver? #4

Open
StillNoob opened this issue Dec 26, 2023 · 6 comments
Open

How can we use this in undetected_chromedriver? #4

StillNoob opened this issue Dec 26, 2023 · 6 comments

Comments

@StillNoob
Copy link

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

@sakanamk
Copy link
Contributor

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

@LINKlang
Copy link

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
Copy link

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

@NoahDrucker
Copy link
Contributor

@LINKlang Glad you solved it!

@RIP-GitHub
Copy link

Can it work in centos7?

@MindaugasSP
Copy link

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

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

No branches or pull requests

6 participants