Code Monkey home page Code Monkey logo

ultrafunkamsterdam / undetected-chromedriver Goto Github PK

View Code? Open in Web Editor NEW
8.5K 125.0 1.0K 356 KB

Custom Selenium Chromedriver | Zero-Config | Passes ALL bot mitigation systems (like Distil / Imperva/ Datadadome / CloudFlare IUAM)

Home Page: https://github.com/UltrafunkAmsterdam/undetected-chromedriver

License: GNU General Public License v3.0

Python 100.00%
chromedriver selenium webdriver chrome anti-detection anti-bot distil browser automation scraping

undetected-chromedriver's Issues

Message: session not created: This version of ChromeDriver only supports Chrome version 81

when I run this code :

from undetected_chromedriver import Chrome, ChromeOptions 
browser = Chrome()
browser.get('https://www.quora.com/')

I am getting this error :
raise exception_class(message, screen, stacktrace) selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 81

Note : I have Chrome version 83

Thank you :)

Hello,

I just want to thank you for the amazing work you have done with this custom version of selenium. it is really awesome.

thanks again!

403 Error: Nike

hello I am currently getting detected using the undetected_chromedriver, I have been using it for a couple weeks now... it ran flawlessly a day or two ago though when tested today on the same instance (website/drop style) I got detected this time. Would appreciate the help when you get the chance, I ran the navigator command to see if the flag was true, it returns undetected despite the error log.

NOTE: I did not update to the new version when first receiving the error, I was using 1.3.7 though updating to the latest version did not change anything

www.nike.com-1601653606474.log

samesite

script

Update: I believe I have figured out the same-cookie issue I took a screen shot of above, I do not think it relates to the "bigger picture" (why I am getting detected on nike) I am receiving error similar to the log above the file above is with the cookie error
fullLOG.log
this is the full log without receiving the same-site cookie error

execute_script gets detected

On websites protected by Distill, like endclothing, they can detect if you execute javascript from the method "execute_script" instead of executing it directly on the console. Is it possible to avoid this detection? I see that selenium applies some scripts before executing mine.
Thanks.

typeError: __init__() got an unexpected keyword argument 'options'

The following is my environment and code
MacOS Mojave 10.14.4
chrome:84

import undetected_chromedriver as uc
chromedriver_path='./chromedriver'
uc.install(executable_path=chromedriver_path)
from selenium.webdriver import Chrome,ChromeOptions
option = ChromeOptions()
option.add_argument('--disable-popup-blocking')
driver = Chrome(chrome_options=option)
driver.get('https://distilnetworks.com')

The following is the error message

Selenium patched. Safe to import Chrome / ChromeOptions
Selenium patched. Safe to import Chrome / ChromeOptions
Selenium patched. Safe to import Chrome / ChromeOptions
Selenium patched. Safe to import Chrome / ChromeOptions
Traceback (most recent call last):
File "/Applications/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 1664, in
main()
File "/Applications/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 1658, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "/Applications/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 1068, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/Users/mac_lee/Documents/iCollections/work/python/workspace/bet365_spider/test0810.py", line 11, in
driver = Chrome(chrome_options=option)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/undetected_chromedriver/init.py", line 49, in new
instance.init(*args, **kwargs)
TypeError: init() got an unexpected keyword argument 'options'

Can you know why this is?

Cloudflare DDOS protection

Hi,

working with the latest version (1.5) , with ChromeDriver 85.0.4183.87,
I'm getting blocked by sites with cloudflare DDOS protection (Under Attack Mode).
Example of such site - http://void.to

driver gets detected and gets stuck in the "Checking your browser" page

SyntaxError: Unexpected token '='

Just downloaded it but now when I run my program I keep getting this error selenium.common.exceptions.WebDriverException: Message: unknown error: Runtime.evaluate threw exception: SyntaxError: Unexpected token '='

I changed it back to normal selenium chromedriver and it worked fine so I am not sure what's going wrong as it does not seem to be my code

Here is the full error message
Selenium patched. Safe to import Chrome / ChromeOptions
Selenium patched. Safe to import Chrome / ChromeOptions
Traceback (most recent call last):
File "botc.pyx", line 89, in
order(keys)
File "botc.pyx", line 21, in wrapper
result = method(args, **kw)
File "botc.pyx", line 40, in order
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, '//
[contains(text(), "Large")]'))).click()
File "/usr/local/lib/python3.8/dist-packages/selenium-3.141.0-py3.8.egg/selenium/webdriver/remote/webelement.py", line 80, in click
self._execute(Command.CLICK_ELEMENT)
File "/usr/local/lib/python3.8/dist-packages/selenium-3.141.0-py3.8.egg/selenium/webdriver/remote/webelement.py", line 633, in _execute
return self._parent.execute(command, params)
File "/usr/local/lib/python3.8/dist-packages/selenium-3.141.0-py3.8.egg/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.8/dist-packages/selenium-3.141.0-py3.8.egg/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Runtime.evaluate threw exception: SyntaxError: Unexpected token '='
(Session info: chrome=81.0.4044.92)

Most common way to make this completely undetectable.

Hey there !

What are (except from Request Header, different UserAgents, using HQ Proxies (Residential,Mobile), Delay requests)

The most common ways for a crawler build with this module to make it as hard detectable as possible ?

We try to make it as sophisticated and hidden as possible.

What are your suggestions ?

Best regards

Recommendation on variable replacement

Just thinking out loud about the latest changes: I wouldn't use a hardcoded replacement like this, because it is also very easy to block, just like "cdc_adoQpo[...]" (if any anti-bot service follows this repo). Instead, I would generate a random string (equal in length to the original string) and use that, as a replacement.

However I do love the fact and the easter egg, that you used "undetectedchromeDRiver" as it is exactly, perfectly the same length as the original, made up variable.

Detection.

Hello! Tested now your chromedriver and it's detected on nike.com

[question] Patching binary

Hello mate,

I would like to thank your amazing work, I do understand everything you do and its absolutely brilliant. I already investigated this a while ago but used a really worse solution than you that was using a MITM proxy and injecting javascript on each request to remove webdriver property etc.

I have one question though, why do you patch the binary and what do you exactly do with that? I see you modify the binary but don't understand how.

Thanks a lot,
Aleix

Google seems to be able to detect WebDriver usage somehow

Hello!

This is a great project and seems to work great indeed for sites that use Distil etc, but, it seems that Google itself is able to detect it.

This can be observed by going to the Google login page at e.g. https://accounts.google.com/, entering a username, and clicking next. When the browser is being controlled by the Web Driver (even with the undetected-chromedriver) it will take you to a "This browser is not safe" page, and not allow you to login.

Note that they seem to be using some kind of heuristic system to decide whether or not to block the login attempt, so when trying to login to certain accounts, it will actually let you through (either with undetected-chromedriver or with the default one). In order to reproduce the issue it is thus best to pick an account at random (e.g., "randomaccount5", or any name that exists).

Do you know how they could be detecting it, and/or whether it would also be possible to implement countermeasures with this project?

I've tried to have a look at the Google login code without much luck (it's somewhat obfuscated and all), but you're definitely an expert at this.

Thanks & best regards!

Cookie errror

evTools listening on ws://127.0.0.1:54000/devtools/browser/2af26cf7-59cd-49c3-9ae4-f5a8513fdf0c
[0620/205233.599:INFO:CONSOLE(0)] "Access to XMLHttpRequest at 'chrome-extension://jnhgnonknehpejjnehehllkliplmbmhn/images/icon16.png' from origin 'https://geo.captc
ha-delivery.com' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, https.", source: https://geo.cap
tcha-delivery.com/captcha/?initialCid=AHrlqAAAAAMAalO8hPIYkaIAWAUn3A%3D%3D&hash=14D062F60A4BDE8CE8647DFC720349&cid=avy1TMopuL3owhfevmncrn39VVTAAsugo_sL6JjQWBNr3~wcNd
FZiWXOwocFBPUgCX3o4tni1hzhVkSE7QXFR.G8SMu9jp1XjStiGWh2el&t=fe (0)
[0620/205233.830:INFO:CONSOLE(0)] "A cookie associated with a cross-site resource at http://captcha-delivery.com/ was set without the SameSite attribute. A future
release of Chrome will only deliver cookies with cross-site requests if they are set with SameSite=None and Secure. You can review cookies in developer tools und
er Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/563352162218803
2.", source: https://datadome.co/customers-stories/toppreise-ends-web-scraping-and-content-theft-with-datadome/ (0)
[0620/205233.920:INFO:CONSOLE(0)] "A cookie associated with a cross-site resource at http://api-na.geetest.com/ was set without the SameSite attribute. A future re
lease of Chrome will only deliver cookies with cross-site requests if they are set with SameSite=None and Secure. You can review cookies in developer tools under
Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.
", source: https://datadome.co/customers-stories/toppreise-ends-web-scraping-and-content-theft-with-datadome/ (0)
[0620/205234.224:INFO:CONSOLE(1)] "The deviceorientation events are blocked by feature policy. See https://github.com/WICG/feature-policy/blob/master/features.md#sen
sor-features", source: https://static.geetest.com/static/js/fullpage.8.9.6.js (1)

Getting detected if any linkedin url called

Hi,

I am able to load up undetected-chromedriver and it shows undetected initially.
When I call any linkedin person profile. Eg. https://www.linkedin.com/in/arnavsaxena/
Immediately after calling it, the webdriver gets detected and it fails.
OS : MacOS Sierra 10.12.6
Chrome Version : 83.0
Could you please help explain this?


import undetected_chromedriver as uc
chromedriver_path = '/Users/arnavsaxena/Downloads/chromedriver'
uc.install(executable_path=chromedriver_path)
from selenium import webdriver

options = webdriver.ChromeOptions()
# opts.add_argument(f'--proxy-server=socks5://127.0.0.1:9050')

options.add_argument("user-data-dir=/Users/arnavsaxena/Library/Application Support/Google/Chrome/Profile 1/Default") #Path to your chrome profile
driver = webdriver.Chrome(chrome_options=options)
test_site = 'https://www.linkedin.com/in/arnavsaxena/'

driver.get('https://bot.sannysoft.com')
# driver.get(test_site)

Screen Shot 2020-06-10 at 1 53 49 PM
Screen Shot 2020-06-10 at 1 54 24 PM

Patch remote selenium

Hello and thank you for the great project. Patching perfectly bypasses the detection in my use case. However I also use the Remote class to connect to the remote selenium standalone server. I assume something similar to what is done in the function patch_selenium_webdriver needs to be done explicitly in corresponding source code. Am I correct? Do you have any indication what needs to be modified?

[AliExpress Bonus Buddies] Selenium Getting Dectected

So, I did some search like you said, I use the vanilla way tested everything.. it's undetected on most of the bot protection site.
But as soon I use driver.get('https://sale.aliexpress.com/__mobile/daily-cash-out-gaming_m.htm?_addShare=no') or the ref link.
AliExpress blocks my account as it detect it, now after even if I change the ip and anything it will always give system error
So basically account become useless.

image
I get this system error, no use as it I even do a manually click after opening the ref link it will give this error, but If i paste the link manually it will work!
Link: Will only work in mobile view!

Can't load extensions in headless mode

Extension I was trying to add https://chrome.google.com/webstore/detail/domain-blocker/ggdcjplapccgoinblmidpkoocfafajfa which I used https://crx-downloader.com/ to download it.

My code works perfectly fine in headlessmode off, but when I turn it on I can't add / use an extension at all. Noticed this with lots of other extensions too, and I'm wondering why?

Code:

def create_session(headless):
	import undetected_chromedriver as uc
	options = uc.ChromeOptions()
	options.headless = headless
	options.add_extension(r"C:\Users\..\Desktop\domain_blocker.crx")
	global driver
	driver = uc.Chrome(options=options)
create_session(True)

Errors in:

Traceback (most recent call last):
  File "C:\Users\..\Desktop\project.py", line 158, in <module>
    create_session(True)
  File "C:\Users\..\Desktop\project.py", line 45, in create_session
    driver = uc.Chrome(options=options)
  File "C:\Program Files\Python38\lib\site-packages\undetected_chromedriver\__init__.py", line 51, in __new__
    instance.__init__(*args, **kwargs)
  File "C:\Program Files\Python38\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 76, in __init__
    RemoteWebDriver.__init__(
  File "C:\Program Files\Python38\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "C:\Program Files\Python38\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "C:\Program Files\Python38\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "C:\Program Files\Python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: failed to wait for extension background page to load: chrome-extension://ggdcjplapccgoinblmidpkoocfafajfa/_generated_background_page.html
from unknown error: page could not be found: chrome-extension://ggdcjplapccgoinblmidpkoocfafajfa/_generated_background_page.html```

Install more

Hello!

Have a possibility to install and execute this "undetected-chromedriver" like a "original Chromedriver" ?? Install and execute without any command line "pip"?

Only download the archive and then execute via python + selenium point via executable_path ?
It would be possible?

Many thanks!

[AliExpress Bonus Buddies] Mobile Taps Being Detected!

If someone can help me out.. would mean alot!
I have spend all night trying to resolve.. so the problem is

I made a Automate Script for AliExpress Bonus Buddies, before the update it didn't required Touch! But now it require touch.. i used your chrome driver before and it couldn't be detected but now I am having issue

If Bot press tap it isn't accepted, If I press the tap it's accepted!!

Human Touch (Mobile View) - iPhone X:
image
image

Bot Touch (Mobile View) - iPhone X:
image
image

Though.. undected-chromedriver fixed this issue! before when it can be just get clicked with click() but now it doesn't work

To Use Touch I had to disable W3C! maybe that can be the cause, would love a solution for this problem!

Webdriver property

The webdriver test at https://bot.sannysoft.com/ fails. It works by checking if the navigator object has the property webdriver (navigator.webdriver || _.has(navigator, "webdriver") returns true)

Edit: managed to resolve

Getting Detected on Remote Linux(Ubuntu) vs Undetected On Mac

I am working on a white hat side project, my intention is to scrape behind a login screen of my own data so that I can plot it :)

I am able to run the code on local env (mac os/ details below) it logins in and able to go to the desired behind login page.

However when promoted to remote linux server (ubuntu/ details below) it fails to login and is rerouted back to login page.

At first I thought it was ip/ dns registering as blacklisted but then I ran both behind a nordvpn (server: us5793) and was still getting the same result: (Works on local not on Remote)

This is the same result for local env and remote env

IP Location Chicago, Illinois (US) 
NordVPN
64.44.80.68, 198.143.57.3
Mac OS X
Chrome 83.0.4103.97
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36
1920px X 1080px
Enabled
Enabled

The expected result is that the function below returns success in finding the "mytrips" text within the html. This indicates the login was a success.

My Speculation Is one of two things,
1 the chromedriver binary responds differently to the cdc replacement you do in your code acts differently in my linux env
2 the way javascript is reinjected back into the code isn't correctly working in linux.

Other found resources:
How to inject JS and beat detection
Many Tests for bot indication
general chrome headless My code passes this for both environments

I'm going to continue hacking away at this thing and would love to help develop a solution for this and other things moving forward :) , Ideally would love to have the equivalent of the networking tab in inspect to debug these things.

Local MacOS (success) -- Login Success
sys.platform: darwin
sysname: Darwin
version: Darwin Kernel Version 19.3.0: Thu Jan  9 20:58:23 PST 2020; root:xnu-6153.81.5~1/RELEASE_X86_64
release: 19.3.0
machine: x86_64
selenium  : 3.141.0

Tried this in python3.6 & 3.8. No luck on either.

Remote Linux(fail) -- Login Fail -- Shouldn't matter with vpn, but this lives in AWS Ec2
sys.platform: linux
sysname: Linux
version: #21~18.04.1-Ubuntu SMP Mon May 11 12:33:03 UTC 2020
release: 5.3.0-1019-aws
machine: x86_64
selenium  : 3.141.0

achieved running behind nordvpn with a shell script

#!/bin/bash

echo "Executing Nord VPN"
nordvpn connect us5793


echo "Executing Python"
python3.8 /home/ubuntu/test.py

echo "Disconnecting VPN"
nordvpn disconnect

**Created a fake account for you to test on as well **

import os
import sys


print(f""" \n
sys.platform: {sys.platform}
sysname: {os.uname().sysname}
version: {os.uname().version}
release: {os.uname().release}
machine: {os.uname().machine}
\n
""")

import undetected_chromedriver as uc
uc.install() #important this is first
from selenium.webdriver import Chrome, ChromeOptions
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from bs4 import BeautifulSoup

from time import sleep



class BotDriver:
    def __init__(self,username, pw, start_url, url_behind_login, headless_input = True):
        self.username = username
        self.pw = pw
        chrome_options = ChromeOptions()
        chrome_options.headless = headless_input
        chrome_options.add_argument("--incognito")
        chrome_options.add_argument('--disable-extensions')
        chrome_options.add_argument("--start-maximized")

        self.driver = Chrome(chrome_options=chrome_options)
        
        self.start_url = start_url
        self.url_behind_login = url_behind_login
        self.driver.get('https://www.iplocation.net/')
        self.driver.get_screenshot_as_file(f"iplocation.png")
        self.driver.get(start_url)
        self.waitdriver =  WebDriverWait( self.driver, 10)

    def get_element(self,findby,argument_to_click):
        element = self.waitdriver.until(EC.element_to_be_clickable((findby, argument_to_click))) 

        return element
    def slow_keys(self,input_keys,element,speed=.2):
        for character in input_keys:
            sleep(speed)
            element.send_keys(character)
        sleep(1)
    def main(self):
        element0 = self.get_element( By.LINK_TEXT,"Sign In or Join" )
        element0.click()
        element1 = self.get_element( By.XPATH,'//*[@id="user-id"]' )
        element1.click()
        self.slow_keys(self.username,element1)
        element2 = self.get_element( By.XPATH,'//*[@id="password"]' )
        element2.click()
        self.slow_keys(self.pw,element2)
        self.driver.get_screenshot_as_file(f"before_submit.png")
        element3 = self.get_element( By.XPATH,"//button[@name='submitButton']" )
        element3.click()
        self.driver.get_screenshot_as_file(f"after_submit.png")
        sleep(3)
        #test string to find
        soup = BeautifulSoup(self.driver.page_source, 'lxml')
        test = soup.body.findAll(text='My Trips')
        if len(test) > 1:
            print(f'\n\n\n Login Success ({test} len {len(test)})\n\n\n')
        else:
            print(f'\n\n\n Login failed ({test} len {len(test)})\n\n\n')
        self.driver.get(self.url_behind_login)
        self.driver.get_screenshot_as_file(f"last.png")

if __name__ == "__main__":
    username = input('Enter your login email: ')
    pw = input('Enter PW: ')
    start_url = 'https://www.marriott.com/default.mi'
    url_behind_login = 'https://www.marriott.com/loyalty/findReservationList.mi'
    pbd = BotDriver(username, pw, start_url, url_behind_login, headless_input = True)
    pbd.main()

Cloudfare protection

The driver is still detected by cloudfare protection, Platzi is a website im trying to web-scrap and i haven't been able to.

ModuleNotFoundError

Hello,

I am amateur working with python3 + Selenium in Pycharm
I have installed and working with selenium and python3 via: pip3

In your readme I view that you said install via "pip install undetected-chromedriver"
but i think that in my case I need to install via "pip3 install undetected-chromedriver"
It would be correct?

I have tried installing using "pip3" And it seems that it has been installed successfully but when go with the script have this error:
ModuleNotFoundError: No module named 'undetected_chromedriver'

This is part of my code:

import undetected_chromedriver as uc
opts = uc.ChromeOptions()
opts.add_argument("--incognito")
opts.add_argument("--disable-blink-features")  
opts.add_argument("--disable-blink-features=AutomationControlled") 
browser = uc.Chrome(options=opts)

Could you tell me that I'm doing wrong?
thanks!

Multi-Tab example

Multi-tab doesn´t work like explained in the important note section.

The code I´ve tried looks like this:

import undetected_chromedriver as uc
options = uc.ChromeOptions()
chrome = uc.Chrome(options=options)
chrome.get('https://example.com')
print('Main window detectable: ' + str(chrome.execute_script('return navigator.webdriver')))
chrome.execute_script('window.open();')
chrome.switch_to.window(chrome.window_handles[1])
chrome.get('data:,')
chrome.get('https://example.com')
print('New tab detectable: ' + str(chrome.execute_script('return navigator.webdriver')))

Is there some point I´m missing here?
Would it be possible to update the documentation with a working example?

By the way thanks for publishing this repo, it saves my day. :)

bet365.com

Do you know why bet365.com won't load when using normal selenium or this undetected chromedriver?

C#

Is there any way to use this with c#?

Auth Proxies

There's any possibility to run the browser with auth Proxies? (the ones with this format ip:port:user:pass)

Google login

Trying to login in Google Account,
Shows:

This browser or app may not be secure. Learn more
Try using a different browser. If you’re already using a supported browser, you can refresh your screen and try again to sign in.

Message: session not created: This version of ChromeDriver only supports Chrome version 87

Hello. I have seen issue #8 but proposed solution doesn't sole my issue.

I'm running a debian with ChromeDriver 83.0.4103.39 and google-chrome 83 and undetected-chromedriver 1.5.1. Had no issue running this configuration with selenium. Recently, I need to bypass CloudFare 5 sec redirection page.

I have tried the 3 methods in the readme of undetected-chromedriver. Got same error each time.

Nov 30 18:21:54 carnac python[855]: selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 87
Nov 30 18:21:54 carnac python[855]: Current browser version is 83.0.4103.106 with binary path /usr/bin/google-chrome

I have tried:

import undetected_chromedriver as uc
uc.TARGET_VERSION = 85
opts = uc.ChromeOptions()
opts.add_argument("--headless")
driver = uc.Chrome(options=opts, enable_console_log=True)
driver.get(my_target_url)

and

import undetected_chromedriver as uc
uc.TARGET_VERSION = 85
uc.install()

from selenium.webdriver import Chrome
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--headless")
driver = webdriver.Chrome(options=chrome_options) 
driver.get(my_target_url)

Any idea ?

Contact

Hey, am looking to hire the creator of this, any contact available?

Release patched Drivers

Hi,

could you upload already patched drivers for all common browsers?
So it could be used in any language! Currently searching such a solution for NodeJS.

Regards

p.s.:
sorry for issuing, but did not find any contacts from you :(

Does it support remotedebugging mode?

I tried to attach driver to an existing chrome process, but failed.
codes :
options = uc.ChromeOptions()
options.add_experimental_option("debuggerAddress", "127.0.0.1:8999")
driver = uc.Chrome(options=options)

error message:
Message: invalid argument: cannot parse capability: goog:chromeOptions
from invalid argument: unrecognized chrome option: excludeSwitches

C#?

I know this is not an issue, but I did not find any way to contact you.

First of all, I love this repo! But my question is if I patch it before using it in python, would I be able to use that patched chromedriver.exe within a C# project?

Thanks!

bet365

Up until a few days ago this worked on bet365 but now I am just getting a white browser window and a spinning icon showing that the page is not loading.

image

Detected by Distill Network

I was trying to scrap g2.com. First time i went to the website it works fine, but the second time i return it detects suspicious activity. The message it pops is:

Pardon Our Interruption...
As you were browsing something about your browser made us think you were a bot. There are a few reasons this might happen:

You're a power user moving through this website with super-human speed.
You've disabled JavaScript and/or cookies in your web browser.
A third-party browser plugin, such as Ghostery or NoScript, is preventing JavaScript from running. Additional information is available in this support article.
After completing the CAPTCHA below, you will immediately regain access to the site again

Brief:
The fact is that i did not moved fast at all, just tried to acces a page. First time it worked, second time i got caught.

Undetected Chromedriver gets detected by Cloudflare and Botfront

When trying to visit a Website protected by cloudflare such as https://beta.welovecloudflare.de it just reloads the 5sec UAM Site.
Doesn't happen with when using my real browser.
Another example would be https://lhcdn.cloud/.
These Sites are Dstats and are mostly there to see if you are able to bypass them.
The undetected Chrome driver isnt going past this.
Any Idea why this happens?

Anyways this a very cool project and works mostly!
edit: i am using the updated version btw, it should be headless as well muchos lovos <3

Headless mode

hallo and goedenavond,

thanks for the repo, it's great. I got a question that is not really an issue but maybe you can help me. I'm trying to scrape a few websites that use distil network protection using your chromedriver and rotating proxies and I'm observing the following strange behavior: If I run the exact same code in headless mode I'm getting detected after a few webpages but if I run without headless on a regular display I don't get detected. Detection happens if I use a virtual display as well.

Is there any test that can detect the presence of an actual display that's not patched yet? Or anything else you might think that could cause this?

Thanks

Getting Detected on Amazon Ec2

First off SUPER cool project. Works flawlessly local on mac.

Getting Detected on Amazon Ec2 Instance. My instinct is telling me I'm getting detected by some Amazon/ Ec2 Detection from the site.

Let me know what details I can provide and how I can contribute to the project! :) ps - I'll be uploading the repo I'm working on that uses yours some time today, just have to package.

Cant see individual requests?

Im trying to see each individual request while using this like in normal Selenium to sort by method, etc but it says
for request in driver.requests: AttributeError: 'WebDriver' object has no attribute 'requests'

Is there something else i should do to sort requests? And how do i print headers? Cookies works fine by doing .get_cookies() but headers doesnt work whichever way i try?

Still gets detected with Recaptcha v3

Any website that uses recaptcha v3 and which I try to automate with this "undetected" version of the chromedriver just makes recaptcha v3 respond with "There was an error trying to send your message. Please try again later."

So I'm sure it's detected :)

Error : undetected_chromedriver/init.py", line 49, in new instance.init(*args, **kwargs) TypeError: init() got an unexpected keyword argument 'options'

Hi
Error bot

My environement : windows server 2012, Chrome Last version, python 3.7 & python 3.8

My Code :
import undetected_chromedriver as uc
driver = uc.Chrome()
driver.get('https://distilnetworks.com')

The Error :
/python3.8/site-packages/undetected_chromedriver/init.py", line 49, in new instance.init(*args, **kwargs) TypeError: init() got an unexpected keyword argument 'options'

This is the screenshot :
https://i.ibb.co/PMPts9L/Error-bot.png

NOTE :
i have two windows server 2012 with the same configuration and same chrome & python & same code
one of them work well, and the other i have the error.

Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.