()
| 33 | |
| 34 | |
| 35 | async def main(): |
| 36 | async with async_playwright() as pw: |
| 37 | browser = await pw.chromium.launch(headless=True) |
| 38 | context = await browser.new_context() |
| 39 | page = await context.new_page() |
| 40 | |
| 41 | await stealth_async(page) # optional stealth |
| 42 | await page.goto("https://example.com") |
| 43 | await human_behavior(page) |
| 44 | # now you can scrape or do more... |
| 45 | await browser.close() |
| 46 | |
| 47 | if __name__ == "__main__": |
| 48 | asyncio.run(main()) |
no test coverage detected