Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from playwright.async_api import async_playwright
- import asyncio
- async def main():
- async with async_playwright() as playwright:
- browser = await playwright.chromium.launch(
- proxy={
- 'server': "181.129.43.3:8080",
- },
- )
- context = await browser.new_context()
- page = await context.new_page()
- await page.goto("https://httpbin.org/ip")
- html_content = await page.content()
- print(html_content)
- await context.close()
- await browser.close()
- asyncio.run(main())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement