psf/requests-html

"Your browser is outdated" error

synalice opened this issue · 3 comments

I've tried running this piece of code:

from requests_html import HTMLSession

session = HTMLSession()
r = session.get("https://vk.com/")
r.html.render()
print(r.text)

Everything related to the library works as expected, except that the HTML response from the website tells me that my browser version is outdated. Is there something that can be done?

I am using requests-html of version 0.10.0.

I experimented with adding wait=4 and sleep=4 but with no success.

I think it's because of the browser version used in 'User–Agent' headers.
A user-agent string must be searched to fix the problem.

ajatkj commented

This project uses pyppeteer which is uses very old version of Chromium. This is easily fixable. You can check my comment on another issue here.