Send already filled form with Python Requests
<p>just a quick question.</p>

<p>Is there a way to submit a pre-filled form with the Python Requests library?</p>

<p>For example, I'm on a page with a pre-filled form, there is a 'Submit' button that's gonna submit a post request with data which is already in form. Is there a way to 'simulate' clicking the 'Submit' button?</p>

<p>I'd like to get the Form Data upon the submission (from header) instead of scrapping each field and getting it's value.</p>

<p>Any help is appreciated. Thank you in advance.</p>

<p>Things like these can easily and transparently be solved with packages like <a href="https://github.com/hickford/MechanicalSoup" rel="nofollow"><code>MechanicalSoup</code></a> or <a href="https://github.com/jmcarp/robobrowser" rel="nofollow"><code>RoboBrowser</code></a>. Both are based on <code>requests</code> and <code>BeautifulSoup</code>, they can read the contents of a form and perform "submit" using the default/given or the custom/supplied values.</p>

<p><a href="https://pypi.python.org/pypi/mechanize/" rel="nofollow"><code>mechanize</code></a> is an another, probably a more popular alternative for this task. </p>

python forms submit python-requests