requests-html
requests-html copied to clipboard
"Your browser is outdated" error
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.