So, I want to automate the completion and submission of the form, and I use Requests for this.
From checking the items, I know the URL to send and the type of feed (message):
method="post" action="/sformsubmit" enctype="multipart/form-data"
My problem is that my request does not go through, and I'm pretty new to this. I do not know why.
On my webpage, I have two buttons next to each other:
___________________________ ________________________________ | Submit decleration | | Reset Form | ___________________________ ________________________________
And when I check the elements on this line, I get:
<td align="center" colspan="2"> <input type="hidden" name="inLeader" value> <input type="hidden" name="inMember" value> <input type="hidden" name="version" value="0"> <input type="hidden" name="key" value="2013:a:c:3:2s"> <input type="submit" value="Submit declaration"> <input type="reset" value="Reset form"> </td>
I am trying to do the following:
>>> payload = {'inLeader':'', 'inMember':'', 'version':'0', 'key':'2013:a:c:3:2s'}
However, it does not seem to work and does not generate any errors.
Any help would be greatly appreciated. thanks in advance
source share