Posting Request Data
<p>I am trying to post requests with Python to register an account.</p>

<p>It is not creating the account.</p>

<p>Any help would be great! </p>

<p>It has to accept the user's email and password and confirmation of their password.</p>

<pre><code>import requests

with requests.Session() as c:
    url="http://icebithosting.com/register.php"
    EMAIL="charliep1551@gmail.com"
    PASSWORD = "test"
    c.get(url)
    login_data= dict(username=EMAIL,password=PASSWORD,confirm=PASSWORD)
    c.post(url, data=login_data,)
    page=c.get("http://icebithosting.com/")
    print (page.content)
</code></pre>

<p>Your form file names are incorrect, they should be:</p>

<pre><code>email:'foo@bar.com'
password:'bar'
confirm_password:'bar' # confirm_password
</code></pre>

<p>Which you can see if you monitor the request in chrome tools:</p>

<p><a href="http://i.stack.imgur.com/ISTEe.png" rel="nofollow"><img src="http://i.stack.imgur.com/ISTEe.png" alt="enter image description here"></a></p>

python python-3.x module python-requests