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

"Your browser is outdated" error

Open nikableh opened this issue 3 years ago • 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.

nikableh avatar Jun 23 '23 12:06 nikableh

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

nikableh avatar Jun 23 '23 12:06 nikableh

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.

kurotom avatar Jul 06 '23 14:07 kurotom

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.

ajatkj avatar Aug 01 '23 15:08 ajatkj