I am using requests-html to get data on this website: https://rl.insider.gg/en/pc. Whenever I send a request to the site and attempt to render the Javascript, I keep getting redirected to the mobile site.
I did some investigating and found out that the site will redirect you to the mobile site when your browser width is <1250px. I also made a temporary API that returns the dimensions of the request, and found that Requests-HTML sends the request in a browser of side 800px X 600px.
Here is my current code:
from requests_html import HTMLSession
url = 'https://rl.insider.gg/en/pc'
session = HTMLSession()
r = session.get(url)
r.html.render(sleep=2, timeout=1000)
#RL Insider redirects to mobile site when the width is less than 1250px
#Request HTML sends the request in a browser that is 800px X 600px, I need to change that
print(r.html.html)
Does anyone know if there are some headers or values that I can pass in the request, which will allow me to change the dimensions of the Requests-HTML browser window ?