raena-crawler-engine/hasaki_crawler_engine/test2.py

20 lines
682 B
Python
Raw Normal View History

2024-04-03 08:36:43 +00:00
import asyncio
from playwright.async_api import async_playwright
async def bypass_cloudflare():
async with async_playwright() as p:
browser = await p.chromium.launch(headless=False)
page = await browser.new_page()
await page.goto('https://hasaki.vn/san-pham/tinh-chat-chong-nang-sunplay-hieu-chinh-sac-da-50g-xanh-87613.html') # Specify the URL of the website you want to access
# Add any necessary code here to interact with the webpage
await asyncio.sleep(10) # Wait for some time for Cloudflare checks
content = await page.content()
print(content)
await browser.close()
asyncio.run(bypass_cloudflare())