I'm trying to load the price history of Nestle through Requests-HTML. The script I'm using is:
import asyncio
import requests
import requests_html
# Jupyter Notebooks related imports
import nest_asyncio
nest_asyncio.apply()
from requests_html import AsyncHTMLSession
test_url= 'https://www.finanzen.ch/kurse/historisch/nestle/swx/1.1.2022_3.7.2022'
asession = AsyncHTMLSession()
rq = await asession.get(test_url)
rq.html.arender()
with open(Path ('HTML_Req_rendered.html'), 'wb') as f:
test_txt= f.write(rq.html.raw_html)
The file [HTML_Req_rendered.html](https://drive.google.com/file/d/1JWSxtM6RVR5I1VgIH-K6ZxQ66e1pbWKz/view?usp=sharing #GoogleDriveLink) is generated correctly but does not contain the price history loaded by javaScript. Please see the link top webpage.
Can anyone help? What am I doing wrong? How can I get a rendered HTML?
Any help is kindly appreciate. Thx. Stefano