{"id":21128838,"url":"https://github.com/kaliiiiiiiiii-vinyzu/patchright-nodejs","last_synced_at":"2025-05-15T20:07:38.637Z","repository":{"id":260878509,"uuid":"882406118","full_name":"Kaliiiiiiiiii-Vinyzu/patchright-nodejs","owner":"Kaliiiiiiiiii-Vinyzu","description":"Undetected NodeJS version of the Playwright testing and automation library. ","archived":false,"fork":false,"pushed_at":"2025-05-09T17:14:44.000Z","size":36,"stargazers_count":252,"open_issues_count":1,"forks_count":15,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-15T20:07:30.702Z","etag":null,"topics":["automation","bot","bots","botting","browser","chrome","chromedriver","chromium","cloudflare","cloudflare-bypass","playwright","stealth","undetectable","undetected","web-auto","web-scraping","webautomation","webdriver","webscraping"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/patchright","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kaliiiiiiiiii-Vinyzu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-02T18:20:59.000Z","updated_at":"2025-05-15T07:55:51.000Z","dependencies_parsed_at":"2024-11-03T09:30:37.162Z","dependency_job_id":"1689265c-94b5-4f94-af16-5cb4ce1ca79d","html_url":"https://github.com/Kaliiiiiiiiii-Vinyzu/patchright-nodejs","commit_stats":{"total_commits":20,"total_committers":3,"mean_commits":6.666666666666667,"dds":0.09999999999999998,"last_synced_commit":"6148cb4d9d04a7dbf1ab277812fd005640174f6b"},"previous_names":["kaliiiiiiiiii-vinyzu/patchright-nodejs"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kaliiiiiiiiii-Vinyzu%2Fpatchright-nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kaliiiiiiiiii-Vinyzu%2Fpatchright-nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kaliiiiiiiiii-Vinyzu%2Fpatchright-nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kaliiiiiiiiii-Vinyzu%2Fpatchright-nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kaliiiiiiiiii-Vinyzu","download_url":"https://codeload.github.com/Kaliiiiiiiiii-Vinyzu/patchright-nodejs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254414501,"owners_count":22067272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","bot","bots","botting","browser","chrome","chromedriver","chromium","cloudflare","cloudflare-bypass","playwright","stealth","undetectable","undetected","web-auto","web-scraping","webautomation","webdriver","webscraping"],"created_at":"2024-11-20T05:10:27.419Z","updated_at":"2025-05-15T20:07:33.563Z","avatar_url":"https://github.com/Kaliiiiiiiiii-Vinyzu.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n    🎭 Patchright NodeJS\n\u003c/h1\u003e\n\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/Kaliiiiiiiiii-Vinyzu/patchright-nodejs/blob/main/LICENSE\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/License-Apache%202.0-green\"\u003e\n    \u003c/a\u003e\n    \u003ca\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Based%20on-Playwright-goldenrod\"\u003e\n    \u003c/a\u003e\n    \u003ca\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Driver-Patched-blue\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/Kaliiiiiiiiii-Vinyzu/patchright-nodejs/releases/latest\"\u003e\n        \u003cimg alt=\"Patchright Version\" src=\"https://img.shields.io/github/v/release/microsoft/playwright?display_name=release\u0026label=Version\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/Kaliiiiiiiiii-Vinyzu/patchright-nodejs/releases\"\u003e\n        \u003cimg alt=\"GitHub Downloads (all assets, all releases)\" src=\"https://img.shields.io/npm/d18m/patchright?color=red\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/Kaliiiiiiiiii-Vinyzu/patchright-nodejs\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Package-NodeJS-seagreen\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n#### Patchright is a patched and undetected version of the Playwright Testing and Automation Framework. \u003c/br\u003e It can be used as a drop-in replacement for Playwright.\n\n\u003e [!NOTE]  \n\u003e This repository serves the Patchright-NodeJS Package. To use Patchright with Python, check out the [Python Package](https://github.com/Kaliiiiiiiiii-Vinyzu/patchright-python).\n\u003e Also check out the main [Patchright Driver Repository](https://github.com/Kaliiiiiiiiii-Vinyzu/patchright)\n\n---\n\n## Install it from NPM\n\n```bash\n# Install Patchright from NPM\nnpm i patchright\n```\n\n```bash\n# Install Chromium-Driver for Patchright\nnpx patchright install chromium\n```\n\n---\n\n## Usage\n#### Just change the import and use it like playwright. Patchright is a drop-in-replacement for Playwright!\n\n\u003e [!IMPORTANT]  \n\u003e Patchright only patches CHROMIUM based browsers. Firefox and Webkit are not supported.\n\n```js\n// patchright here!\nconst { chromium } = require('patchright');\n\n(async () =\u003e {\n  const browser = await chromium.launch();\n  const page = await browser.newPage();\n  await page.goto('http://example.com');\n  // other actions...\n  await browser.close();\n})();\n```\n\n### Best Practice  - use Chrome without Fingerprint Injection\n\nTo be completely undetected, use the following configuration:\n```js\nchromium.launchPersistentContext(\"...\", {\n    channel: \"chrome\",\n    headless: false,\n    viewport: null,\n    // do NOT add custom browser headers or userAgent\n});\n```\n\n\u003e [!NOTE]\n\u003e We recommend using Google Chrome instead of Chromium.\n\u003e You can install it via `npx patchright install chrome` (or via any other installation method) and use it with `channel: \"chrome\"`.\n\n\n---\n\n## Patches\n\n### [Runtime.enable](https://vanilla.aslushnikov.com/?Runtime.enable) Leak\nThis is the biggest Patch Patchright uses. To avoid detection by this leak, patchright avoids using [Runtime.enable](https://vanilla.aslushnikov.com/?Runtime.enable) by executing Javascript in (isolated) ExecutionContexts.\n\n### [Console.enable](https://vanilla.aslushnikov.com/?Console.enable) Leak\nPatchright patches this leak by disabling the Console API all together. This means, console functionality will not work in Patchright. If you really need the console, you might be better off using Javascript loggers, although they also can be easily detected.\n\n### Command Flags Leaks\nPatchright tweaks the Playwright Default Args to avoid detection by Command Flag Leaks. This (most importantly) affects:\n- `--disable-blink-features=AutomationControlled` (added) to avoid navigator.webdriver detection.\n- `--enable-automation` (removed) to avoid navigator.webdriver detection.\n- `--disable-popup-blocking` (removed) to avoid popup crashing.\n- `--disable-component-update` (removed) to avoid detection as a Stealth Driver.\n- `--disable-default-apps` (removed) to enable default apps.\n- `--disable-extensions` (removed) to enable extensions\n\n### General Leaks\nPatchright patches some general leaks in the Playwright codebase. This mainly includes poor setups and obvious detection points.\n\n### Closed Shadow Roots\nPatchright is able to interact with elements in Closed Shadow Roots. Just use normal locators and Patchright will do the rest.\n\u003cbr/\u003e\nPatchright is now also able to use XPaths in Closed Shadow Roots.\n\n---\n\n## Stealth\n\nWith the right setup, Patchright currently is considered undetectable.\nPatchright passes:\n- [Brotector](https://kaliiiiiiiiii.github.io/brotector/) ✅ (with [CDP-Patches](https://github.com/Kaliiiiiiiiii-Vinyzu/CDP-Patches/))\n- [Cloudflare](https://cloudflare.com/) ✅\n- [Kasada](https://www.kasada.io/) ✅\n- [Akamai](https://www.akamai.com/products/bot-manager/) ✅\n- [Shape/F5](https://www.f5.com/) ✅\n- [Bet365](https://bet365.com/) ✅\n- [Datadome](https://datadome.co/products/bot-protection/) ✅\n- [Fingerprint.com](https://fingerprint.com/products/bot-detection/) ✅\n- [CreepJS](https://abrahamjuliot.github.io/creepjs/) ✅\n- [Sannysoft](https://bot.sannysoft.com/) ✅\n- [Incolumitas](https://bot.incolumitas.com/) ✅\n- [IPHey](https://iphey.com/) ✅\n- [Browserscan](https://browserscan.net/) ✅\n- [Pixelscan](https://pixelscan.net/) ✅\n\n---\n\n## Documentation and API Reference\nSee the original [Playwright Documentation](https://playwright.dev/docs/intro) and [API Reference](https://playwright.dev/docs/api/class-playwright)\n\n## Extended Patchright API\n#### **`evaluate`** Method \u003csub\u003e([`Frame.evaluate`](https://playwright.dev/docs/api/class-frame#frame-evaluate), [`Page.evaluate`](https://playwright.dev/docs/api/class-page#page-evaluate),  [`Locator.evaluate`](https://playwright.dev/docs/api/class-locator#locator-evaluate),  [`Worker.evaluate`](https://playwright.dev/docs/api/class-worker#worker-evaluate))\u003c/sub\u003e\n- Added `isolatedContext`  to choose Execution Context (Main/Isolated). `Bool` (*optional*, Defaults to `true`)\n```diff\nobject.evaluate(\n    pageFunction: Function | string,\n    arg?: Arg,\n    ...,\n+   isolatedContext: boolean = true\n)\n```\n\n#### **`evaluateHandle`** Method \u003csub\u003e([`Frame.evaluateHandle`](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle), [`Page.evaluateHandle`](https://playwright.dev/docs/api/class-page#page-evaluate-handle), [`Locator.evaluateHandle`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle), [`Worker.evaluateHandle`](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle))\u003c/sub\u003e\n- Added `isolatedContext`  to choose Execution Context (Main/Isolated). `Bool` (*optional*, Defaults to `true`)\n```diff\nobject.evaluateHandle(\n    pageFunction: Function | string,\n    arg?: Arg,\n    ...,\n+   isolatedContext: boolean = true\n)\n```\n\n---\n\n## Bugs\n#### The bugs are documented in the [Patchright Driver Repository](https://github.com/Kaliiiiiiiiii-Vinyzu/patchright#bugs).\n\n---\n\n### TODO\n#### The TODO is documented in the [Patchright Driver Repository](https://github.com/Kaliiiiiiiiii-Vinyzu/patchright#todo).\n\n\n---\n\n## Development\n\nDeployment of new Patchright versions are automatic, but bugs due to Playwright codebase changes may occur. Fixes for these bugs might take a few days to be released. \n\n---\n\n## Support our work\n\nIf you choose to support our work, please contact [@vinyzu](https://discord.com/users/935224495126487150) or [@steve_abcdef](https://discord.com/users/936292409426477066) on Discord.\n\n---\n\n## Copyright and License\n© [Vinyzu](https://github.com/Vinyzu/)\n\nPatchright is licensed [Apache 2.0](https://choosealicense.com/licenses/apache-2.0/)\n\n---\n\n## Disclaimer\n\nThis repository is provided for **educational purposes only**. \\\nNo warranties are provided regarding accuracy, completeness, or suitability for any purpose. **Use at your own risk**—the authors and maintainers assume **no liability** for **any damages**, **legal issues**, or **warranty breaches** resulting from use, modification, or distribution of this code.\\\n**Any misuse or legal violations are the sole responsibility of the user**. \n\n---\n\n## Authors\n\n#### Active Maintainer: [Vinyzu](https://github.com/Vinyzu/) \u003c/br\u003e Co-Maintainer: [Kaliiiiiiiiii](https://github.com/kaliiiiiiiiii/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaliiiiiiiiii-vinyzu%2Fpatchright-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaliiiiiiiiii-vinyzu%2Fpatchright-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaliiiiiiiiii-vinyzu%2Fpatchright-nodejs/lists"}