From dd89df166693b2d94cb3054912388fad51da12b9 Mon Sep 17 00:00:00 2001 From: Leon Date: Mon, 15 Jun 2020 18:46:07 +0200 Subject: [PATCH 1/5] removed the "platform" key of Network.setUserAgentOverride It did nothing but causing confusion :) --- undetected_chromedriver/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/undetected_chromedriver/__init__.py b/undetected_chromedriver/__init__.py index e08c904..28b5d3b 100644 --- a/undetected_chromedriver/__init__.py +++ b/undetected_chromedriver/__init__.py @@ -72,7 +72,6 @@ class Chrome: "Network.setUserAgentOverride", { "userAgent": original_user_agent_string.replace("Headless", ""), - "platform": "Windows", }, ) logger.info(f"starting undetected_chromedriver.Chrome({args}, {kwargs})") From 482ba0181fd8fbfa2d7055f7c66c2aaf0ebb0cf2 Mon Sep 17 00:00:00 2001 From: Leon Date: Mon, 15 Jun 2020 19:16:19 +0200 Subject: [PATCH 2/5] Update README.md --- README.md | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 405b2b5..0c7f245 100644 --- a/README.md +++ b/README.md @@ -14,12 +14,12 @@ Automatically downloads the driver binary and patches it. ``` pip install git+https://github.com/ultrafunkamsterdam/undetected-chromedriver.git ``` -##### important note: -the default blank page on start plays a BIG role in the anti-detection workings of the module. You will only become undetectable from the moment you use driver.get(url) to navigate to some url (and next and next and next). This automatically means that if you enter a url in the browser screen by hand right after launch, you are NOT protected! New Tabs: same story. If you really need multi-tabs, then open the tab with the blank page (hint: url is `data:,` including comma, and yes, driver accepts it) and do your thing as usual. If you follow these "rules" (actually its default behaviour), then you will have a great time for now. -##### ## Usage ## +To prevent unnecessary hair-pulling and issue-rasing, please mind the **[important note at the end of this document](#important-note) .** + +
#### the easy way (recommended) #### ```python @@ -61,4 +61,20 @@ driver.get('https://distilnetworks.com') ``` +### important note ### + +the default blank page on start plays a BIG role in the anti-detection workings of the module. You will only become undetectable from the moment you use driver.get(url) to navigate to some url (and next and next and next). This automatically means that if you enter a url in the browser screen by hand right after launch, you are NOT protected! New Tabs: same story. If you really need multi-tabs, then open the tab with the blank page (hint: url is `data:,` including comma, and yes, driver accepts it) and do your thing as usual. If you follow these "rules" (actually its default behaviour), then you will have a great time for now. + +TL;DR and for the visual-minded: + +```python +In [1]: import undetected_chromedriver as uc +In [2]: driver = uc.Chrome() +In [3]: driver.execute_script('return navigator.webdriver') +Out[3]: True # Detectable +In [4]: driver.get('https://distilnetworks.com') # starts magic +In [4]: driver.execute_script('return navigator.webdriver') +In [5]: None # Undetectable! +``` +### end important note ### From 3658fb38eb5887177394460391e3a4b2d8ac20d5 Mon Sep 17 00:00:00 2001 From: Leon Date: Mon, 15 Jun 2020 19:17:32 +0200 Subject: [PATCH 3/5] Update setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 8df6468..1a827a6 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ from setuptools import setup setup( name='undetected-chromedriver', - version='1.2.2', + version='1.3.0', packages=['undetected_chromedriver'], install_requires=[ 'selenium', From f8ac6c10392d75699c762eeec25a04f2b307d457 Mon Sep 17 00:00:00 2001 From: Leon Date: Mon, 15 Jun 2020 19:18:49 +0200 Subject: [PATCH 4/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0c7f245..5da913b 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ https://github.com/ultrafunkamsterdam/undetected-chromedriver Optimized Selenium Chromedriver patch which does not trigger anti-bot services like Distill Network. Automatically downloads the driver binary and patches it. -* **Tested on version 75,76,77,78,79,80,81,83** +* **Tested on version 75,76,77,78,79,80,81,83,84** * **patching also works on MS Edge (chromium-based) webdriver binary** From 71cd7db89cb9187092dd376eb599da139f2ac309 Mon Sep 17 00:00:00 2001 From: Leon Date: Mon, 15 Jun 2020 19:23:26 +0200 Subject: [PATCH 5/5] Update README.md --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5da913b..93fb107 100644 --- a/README.md +++ b/README.md @@ -23,9 +23,15 @@ To prevent unnecessary hair-pulling and issue-rasing, please mind the **[importa #### the easy way (recommended) #### ```python -from undetected_chromedriver import Chrome, ChromeOptions -driver = Chrome() +import undetected_chromedriver as uc +driver = uc.Chrome() driver.get('https://distilnetworks.com') + +# To target specific version + +import undetected_chromedriver as uc +uc.TARGET_VERSION = 84 +driver = uc.Chrome() ```