Good, I need to download a web page, I did it with requests but the downloaded content is not the same as what is seen in the browser, I think it is because the content changes through javascript once in the browser.
My code:
import requests
r = requests.get("https://www.mipagina.com/")
file = open("archivo2.html", "w")
file.write(r.text)
file.close()
Response
<div>
<ul class="contenido-dinamico"></ul>
</div>
where the content I need is inside<ul></ul>
I found a solution using https://pypi.org/project/requests-html/
I share the solution.
Install first
requests-html
, this only worked for me with python3.7Response.-
I hope I can serve more than one.