tf-playwright-stealth-1.2.0


توضیحات

Makes playwright stealthy like a ninja!
ویژگی مقدار
سیستم عامل -
نام فایل tf-playwright-stealth-1.2.0
نام tf-playwright-stealth
نسخه کتابخانه 1.2.0
نگهدارنده []
ایمیل نگهدارنده []
نویسنده -
ایمیل نویسنده -
آدرس صفحه اصلی https://www.agentql.com/
آدرس اینترنتی https://pypi.org/project/tf-playwright-stealth/
مجوز MIT
# 🥷🏻 tf-playwright-stealth [![PyPI version](https://img.shields.io/pypi/v/tf-playwright-stealth)](https://pypi.org/project/tf-playwright-stealth/) [![AgentQL](https://img.shields.io/badge/AgentQL-AgentQL-informational)](https://agentql.com) [![Join Discord](https://img.shields.io/badge/join-discord-infomational)](https://discord.gg/agentql) > Transplanted from [puppeteer-extra-plugin-stealth](https://github.com/berstend/puppeteer-extra/tree/master/packages/puppeteer-extra-plugin-stealth). This is a package that makes playwright stealthy like a ninja by spoofing browser features in order to reduce the chance of detection. ## Install ``` pip install tf-playwright-stealth ``` ## Usage ### sync ```python from playwright.sync_api import sync_playwright from playwright_stealth import stealth_sync with sync_playwright() as p: browser = p.chromium.launch( headless=True, ) page = browser.new_page() stealth_sync(page) page.goto("https://bot.sannysoft.com/") page.screenshot(path=f"example_with_stealth.png", full_page=True) browser.close() ``` ### async ```python from playwright.async_api import async_playwright from playwright_stealth import stealth_async with async_playwright() as p: browser = await p.chromium.launch( headless=True, ) page = await browser.new_page() await stealth_async(page) await page.goto("https://bot.sannysoft.com/") await page.screenshot(path=f"example_with_stealth_async.png", full_page=True) await browser.close() ``` ## Results From [bot.sannysoft.com](https://bot.sannysoft.com/) | Headless | Headful | |----------|---------| | ![Headless](./images/example_with_stealth_headless.png) | ![Headful](./images/example_with_stealth_headful.png) |


نیازمندی

مقدار نام
- playwright<2,>=1
- fake-http-header<0.4.0,>=0.3.5


زبان مورد نیاز

مقدار نام
<4.0,>=3.9 Python


نحوه نصب


نصب پکیج whl tf-playwright-stealth-1.2.0:

    pip install tf-playwright-stealth-1.2.0.whl


نصب پکیج tar.gz tf-playwright-stealth-1.2.0:

    pip install tf-playwright-stealth-1.2.0.tar.gz