Metadata-Version: 2.5
Name: undetected-updated
Version: 1.0.2
Summary: Selenium Chrome drop-in with chromedriver patching and automatic page-level JS injection.
Author-email: lovebrownie <91576261+lovebrownie@users.noreply.github.com>, dornech <dornech@gmx.de>
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Programming Language :: Python :: 3.10
License-File: LICENSE
Requires-Dist: selenium>=4.39.0,<5.0.0
Requires-Dist: requests>=2.32.3,<3.0.0
Requires-Dist: websockets>=15.0,<16.0.0
Requires-Dist: packaging>=24.0
Project-URL: Homepage, https://github.com/dornech/undetected
Project-URL: Issues, https://github.com/dornech/undetected/issues
Project-URL: Repository, https://github.com/dornech/undetected
Import-Name: undetected

# Undetected

A Selenium Chrome drop-in that hardens automation against common bot checks.

It patches the chromedriver binary (CDC / `test-type=webdriver`) and injects page-level scripts on every `uc.Chrome()` session (CDP leak cleanup, `navigator.webdriver`, chrome runtime, iframes, WebGL, and more).

**Note:** Fork of [`undetected-chromedriver`](https://github.com/ultrafunkamsterdam/undetected-chromedriver). Results vary - these patches help, but they are not a guarantee against every detector.
This repository is a fork of the fork with following changes:
- switch backend to flit allowing proper build (hatch does not work with setup-dist)
- make injections optional due to bot-detection issues

## Installation

```bash
pip install git+https://github.com/lovebrownie/undetected.git
```

## Simple Usage

```python
import undetected as uc

driver = uc.Chrome()
driver.get("https://bot.sannysoft.com/")
driver.quit()
```

```python
import undetected as uc

options = uc.ChromeOptions()
options.languages = ["fr-FR", "fr"]

driver = uc.Chrome(options=options)
driver.get("https://bot.sannysoft.com/")
driver.quit()
```

## Multi-Threading

```python
import undetected as uc
import threading

def worker(idx: int):
    driver = uc.Chrome(user_multi_procs=True)
    driver.get("https://www.google.com/")
    driver.quit()

if __name__ == "__main__":
    threads = [threading.Thread(target=worker, args=(i,)) for i in range(4)]
    for t in threads:
        t.start()
    for t in threads:
        t.join()
```

