Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: screenshot were not saved into AsyncCrawlResponse #139

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Jacky97s
Copy link

@Jacky97s Jacky97s commented Oct 7, 2024

Description

This pull request addresses an issue where the screenshot functionality in AsyncWebCrawler is not working as expected, leading to an assertion error.

Issue

When using the sample code to run the crawler with screenshot=True, an AssertionError is raised because the result.screenshot is None:

Sample Code:

async with AsyncWebCrawler(verbose=False) as crawler:
    result = await crawler.arun(url="https://example.com", screenshot=True, bypass_cache=True)

    assert result.success is True
    assert result.screenshot is not None, "Screenshot is None"

Output

    assert result.screenshot is not None, "Screenshot is None"
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Screenshot is None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant