Login with python mechanize
<p>I am trying to create a python script that uses mechanize to submit data to a web form.</p>

<p>This is what I have so far</p>

<pre><code>import mechanize


username = &lt;my_username&gt;
password = &lt;my_password&gt;
url = &lt;my_url&gt;


print "opening browser"
br = mechanize.Browser()
print "opening url...please wait"
br.open(url)
print br.title()
print "selecting form"
br.select_form(name='Login')
br['UserID'] = username
br['PassPhrase'] = password
print "submitting form"
br.submit()
</code></pre>

<p>I'm stuck on what to do now. Does <code>br</code> now contain the next webpage than comes up after submitting the form? Is there a way I can print the <code>html</code> in <code>br</code> to check what webpage is in it? (I cant use <code>print br.title()</code> because both pages have the same title)</p>