I'm trying to scrape a form, to insert an attachment and send, using Robobrowser.
To open the page I do:
browser.open('url')
To get the form I do:
form = browser.get_form(id='id_form')
To insert the data into the form I do:
form['data_dia'] = '25' # por exemplo
To submit the form I do:
browser.submit_form(form, form['btnEnviar'])
or just
browser.submit_form(form)
But this is not working, the form is not being sent. When I try to fetch all inputs from the page, I find that the send button is not coming from the Robobrowser.
Doing,
todos_inputs = browser.find_all('input')
for t in todos_inputs:
print(t)
I do not get the input tag with id 'btnEnviar', which in the html code of the page is inside the form. The other form inputs are coming, such as 'day', 'month' and 'year', for example.
I did not post the html code because it needs login and password to access.
The problem is that Robobrowser is not able to wipe all the information in the html, only one part, so that I can not send the form. Is there a solution to this? Or is there another way to fill out a form and submit it with other tools except RoboBrowser and BeautifulSoup?