Repository navigation
Crawl4AI Not Extracting Data After Successful Login Using Playwright #849
Unanswered
AhmadSadik1
asked this question in
Forums - Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I'm trying to use Crawl4AI along with Playwright to extract data from a website. The login process seems to work fine, but when Crawl4AI runs, it does not extract any information from the page.
code:
`
from playwright.async_api import async_playwright
from crawl4ai import AsyncWebCrawler
import asyncio
async def login_and_get_page(browser):
context = await browser.new_context(viewport={'width': 1920, 'height': 1080})
page = await context.new_page()
async def main():
print("[HOOK] on_browser_created")
asyncio.run(main())
`
output:
`
[HOOK] on_browser_created
title: Social Bot
login pass
[INIT].... → Crawl4AI 0.5.0.post4
[FETCH]... ↓ https://xxxx/xxxxx | Status: True | Time: 35.94s
[SCRAPE].. ◆ https://xxxx/xxxxx | Time: 0.007s
[COMPLETE] ● https://xxxx/xxxxx | Status: True | Total: 35.95s
`
Additionally, I have an AsyncCrawlerStrategy class, which looks like this:
`
class AsyncCrawlerStrategy(ABC):
"""
Abstract base class for crawler strategies.
Subclasses must implement the crawl method.
"""
`
All reactions