Skip to content

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

@matthbull

Description

@matthbull

.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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions