playwright-stealth-plus


Nameplaywright-stealth-plus JSON
Version 1.0.601 PyPI version JSON
download
home_pagehttps://github.com/AtuboDad/playwright_stealth
Summaryplaywright stealth
upload_time2024-08-20 15:43:50
maintainerNone
docs_urlNone
authorAtuboDad
requires_python!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=3
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # playwright_stealth

Transplanted from [puppeteer-extra-plugin-stealth](https://github.com/berstend/puppeteer-extra/tree/master/packages/puppeteer-extra-plugin-stealth), **Not perfect**.

## Install

```
$ pip install playwright-stealth
```

## Usage
### sync
```python

from playwright.sync_api import sync_playwright
from playwright_stealth import stealth_sync

with sync_playwright() as p:
    for browser_type in [p.chromium, p.firefox, p.webkit]:
        browser = browser_type.launch()
        page = browser.new_page()
        stealth_sync(page)
        page.goto('http://whatsmyuseragent.org/')
        page.screenshot(path=f'example-{browser_type.name}.png')
        browser.close()

```
### async
```python
# -*- coding: utf-8 -*-
import asyncio
from playwright.async_api import async_playwright
from playwright_stealth import stealth_async

async def main():
    async with async_playwright() as p:
        for browser_type in [p.chromium, p.firefox, p.webkit]:
            browser = await browser_type.launch()
            page = await browser.new_page()
            await stealth_async(page)
            await page.goto('http://whatsmyuseragent.org/')
            await page.screenshot(path=f'example-{browser_type.name}.png')
            await browser.close()

asyncio.get_event_loop().run_until_complete(main())
```

## Test results

### playwright with stealth

![playwright without stealth](./images/example_with_stealth.png)

### playwright without stealth

![playwright with stealth](./images/example_without_stealth.png)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/AtuboDad/playwright_stealth",
    "name": "playwright-stealth-plus",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=3",
    "maintainer_email": null,
    "keywords": null,
    "author": "AtuboDad",
    "author_email": "lcjasas@sina.com",
    "download_url": "https://files.pythonhosted.org/packages/9d/35/298c153c90ef11d103b7bca9f2fad366e529857932d11b7b1259cb73e378/playwright_stealth_plus-1.0.601.tar.gz",
    "platform": null,
    "description": "# playwright_stealth\n\nTransplanted from [puppeteer-extra-plugin-stealth](https://github.com/berstend/puppeteer-extra/tree/master/packages/puppeteer-extra-plugin-stealth), **Not perfect**.\n\n## Install\n\n```\n$ pip install playwright-stealth\n```\n\n## Usage\n### sync\n```python\n\nfrom playwright.sync_api import sync_playwright\nfrom playwright_stealth import stealth_sync\n\nwith sync_playwright() as p:\n    for browser_type in [p.chromium, p.firefox, p.webkit]:\n        browser = browser_type.launch()\n        page = browser.new_page()\n        stealth_sync(page)\n        page.goto('http://whatsmyuseragent.org/')\n        page.screenshot(path=f'example-{browser_type.name}.png')\n        browser.close()\n\n```\n### async\n```python\n# -*- coding: utf-8 -*-\nimport asyncio\nfrom playwright.async_api import async_playwright\nfrom playwright_stealth import stealth_async\n\nasync def main():\n    async with async_playwright() as p:\n        for browser_type in [p.chromium, p.firefox, p.webkit]:\n            browser = await browser_type.launch()\n            page = await browser.new_page()\n            await stealth_async(page)\n            await page.goto('http://whatsmyuseragent.org/')\n            await page.screenshot(path=f'example-{browser_type.name}.png')\n            await browser.close()\n\nasyncio.get_event_loop().run_until_complete(main())\n```\n\n## Test results\n\n### playwright with stealth\n\n![playwright without stealth](./images/example_with_stealth.png)\n\n### playwright without stealth\n\n![playwright with stealth](./images/example_without_stealth.png)\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "playwright stealth",
    "version": "1.0.601",
    "project_urls": {
        "Homepage": "https://github.com/AtuboDad/playwright_stealth"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1eff9206cdbe7be5a6497ff56e1283df46a0ffa875f390db641aa706e6df9463",
                "md5": "1bb0ed1edf58357506c97a4446794363",
                "sha256": "3c7f5b586a1d25552650fa007ee11a105d9dc4e5fdeb990dc898eab12ba75551"
            },
            "downloads": -1,
            "filename": "playwright_stealth_plus-1.0.601-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1bb0ed1edf58357506c97a4446794363",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=3",
            "size": 28615,
            "upload_time": "2024-08-20T15:43:49",
            "upload_time_iso_8601": "2024-08-20T15:43:49.458824Z",
            "url": "https://files.pythonhosted.org/packages/1e/ff/9206cdbe7be5a6497ff56e1283df46a0ffa875f390db641aa706e6df9463/playwright_stealth_plus-1.0.601-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9d35298c153c90ef11d103b7bca9f2fad366e529857932d11b7b1259cb73e378",
                "md5": "70ddccba10b74f9cd74ad27c507c4d74",
                "sha256": "2b7972563cc92441581c3072058c6f286d0354dde212c5d9ac8b913a3960ce8a"
            },
            "downloads": -1,
            "filename": "playwright_stealth_plus-1.0.601.tar.gz",
            "has_sig": false,
            "md5_digest": "70ddccba10b74f9cd74ad27c507c4d74",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=3",
            "size": 20010,
            "upload_time": "2024-08-20T15:43:50",
            "upload_time_iso_8601": "2024-08-20T15:43:50.804781Z",
            "url": "https://files.pythonhosted.org/packages/9d/35/298c153c90ef11d103b7bca9f2fad366e529857932d11b7b1259cb73e378/playwright_stealth_plus-1.0.601.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-20 15:43:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "AtuboDad",
    "github_project": "playwright_stealth",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "playwright-stealth-plus"
}
        
Elapsed time: 0.40775s