I am trying to automate a web data collection process using Python. In my case, I need to extract the information from the page https://app.ixml.com.br/documentos/nfe. However, before going to this page, you must log in at https://app.ixml.com/login. The following code theoretically should log in to the site:
import re from robobrowser import RoboBrowser username = 'meu email' password = 'minha senha' br = RoboBrowser() br.open('https://app.ixml.com.br/login') form = br.get_form() form('email') = username form('senha') = password br.submit_form(form) src = str(br.parsed())
However, when printing the src variable, I get the source code of the page https://app.ixml.com.br/login, that is, before logging in. If I enter the following lines at the end of the previous code
br.open('https://app.ixml.com.br/documentos/nfe') src2 = str(br.parsed())
The src2 variable contains the source code of the page https://app.ixml.com.br/ .. I tried some variations, such as creating a new br object, but I got the same result. How can I access the information at https://app.ixml.com.br/documentos/nfe?