forked from microsoft/playwright-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpatch_check.py
27 lines (21 loc) · 922 Bytes
/
patch_check.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import asyncio
from undetected_playwright.async_api import async_playwright, Playwright
async def run(playwright: Playwright):
args = []
args.append("--disable-blink-features=AutomationControlled")
browser = await playwright.chromium.launch( headless=False, args=args)
page = await browser.new_page()
await page.goto("https://hmaker.github.io/selenium-detector/")
await page.evaluate("document")
await page.evaluate("document.body")
await page.evaluate("document.documentElement.outerHTML")
await page.goto("https://nowsecure.nl/#relax")
await page.evaluate("document")
res = await page.evaluate("document.documentElement.outerHTML")
await page.goto("https://abrahamjuliot.github.io/creepjs/")
await browser.close()
async def main():
async with async_playwright() as playwright:
await run(playwright)
if __name__ == "__main__":
asyncio.run(main())