requests-html icon indicating copy to clipboard operation
requests-html copied to clipboard

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

Open matthbull opened this issue 1 year ago • 1 comments

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

matthbull avatar Oct 22 '24 08:10 matthbull

See #573

cboinphsa avatar Dec 20 '24 15:12 cboinphsa