Skip to content

How can we use this in undetected_chromedriver? #4

Open

Description

@StillNoob

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

Activity

  1. sakanamk commented on Jun 21, 2024

    @sakanamk
    Contributor

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

  2. LINKlang commented on Aug 24, 2024

    @LINKlang

    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()
    
  3. LINKlang commented on Aug 24, 2024

    @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')
    
  4. NoahDrucker commented on Aug 27, 2024

    @NoahDrucker
    Contributor

    @LINKlang Glad you solved it!

  5. RIP-GitHub commented on Sep 18, 2024

    @RIP-GitHub

    Can it work in centos7?

  6. MindaugasSP commented on Sep 18, 2024

    @MindaugasSP

    @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions