crawl4ai icon indicating copy to clipboard operation
crawl4ai copied to clipboard

Is their a way to scrape an already opened playwright webpage?

Open Zubair2019 opened this issue 1 year ago • 2 comments

Zubair2019 avatar Jan 08 '25 09:01 Zubair2019

using this async def main1(): user_agent: str = ( "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) AppleWebKit/537.36 " "(KHTML, like Gecko) Chrome/116.0.5845.187 Safari/604.1 Edg/117.0.2045.47" ) async with async_playwright() as playwright: url= URL browser = await playwright.chromium.launch(headless=True) context = await browser.new_context(user_agent=user_agent) page = await context.new_page()

Zubair2019 avatar Jan 08 '25 09:01 Zubair2019

@Zubair2019 Hello, thanks for trying Crawl4ai. I see some ambiguity in your question. Correct me if I'm wrong. You're saying that you already have your own Playwright objects and that you created a new page object. You want to use this page object in the process of Crawl4ai data crawling. Is that right?

unclecode avatar Jan 08 '25 11:01 unclecode