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

Error when using AsyncSession with html.render. RuntimeWarning: coroutine 'Browser._targetInfoChanged' was never awaited #591

Open
matthbull opened this issue Oct 22, 2024 · 1 comment

Comments

@matthbull
Copy link

matthbull commented Oct 22, 2024

.venv\Lib\site-packages\pyee\base.py:164: RuntimeWarning: coroutine 'Browser._targetInfoChanged' was never awaited

This error occurs when I run the following code:

    async def scrape(self, url):
        r = await self.asession.get(url)
        if r.status_code != 200:
            raise ScraperException(f"URL pull failed: {r.status_code}")

        await r.html.arender()
        return r.html

am I missing something? Its only the arender line causing the issue.

following docs from https://requests.readthedocs.io/projects/requests-html/en/latest/#javascript-support

thanks in advance.

@cboinphsa
Copy link

See #573

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

No branches or pull requests

3 participants
@matthbull @cboinphsa and others