title: use python requests to submit a form and get results
body: <p>I am not familiar with requests of python. I need to do one thing. here's a link:<a href="https://bugzilla.mozilla.org/buglist.cgi?bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;bug_status=CLOSED&amp;query_format=advanced&amp;resolution=---&amp;resolution=FIXED&amp;resolution=INVALID&amp;resolution=WONTFIX&amp;resolution=DUPLICATE&amp;resolution=WORKSFORME&amp;resolution=INCOMPLETE&amp;resolution=SUPPORT&amp;resolution=EXPIRED&amp;resolution=MOVED&amp;order=bug_id&amp;limit=10" rel="nofollow">https://bugzilla.mozilla.org/buglist.cgi?bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;bug_status=CLOSED&amp;query_format=advanced&amp;resolution=---&amp;resolution=FIXED&amp;resolution=INVALID&amp;resolution=WONTFIX&amp;resolution=DUPLICATE&amp;resolution=WORKSFORME&amp;resolution=INCOMPLETE&amp;resolution=SUPPORT&amp;resolution=EXPIRED&amp;resolution=MOVED&amp;order=bug_id&amp;limit=10</a></p>
  
  <p>There is a button of xml below. If you click this button, you will get a xml page. I hope I can use python code to automatically get the xml content.</p>
  
  <p>the html on that page of the xml button is :</p>
  
  <blockquote>
  <pre><code>&lt;form method="post" action="show_bug.cgi"&gt;
  &lt;input type="hidden" name="ctype" value="xml"&gt;
  &lt;input type="hidden" name="id" value="35"&gt;
  &lt;input type="hidden" name="id" value="36"&gt;
  &lt;input type="hidden" name="id" value="37"&gt;
  &lt;input type="hidden" name="id" value="38"&gt;
  &lt;input type="hidden" name="id" value="39"&gt;
  &lt;input type="hidden" name="id" value="41"&gt;
  &lt;input type="hidden" name="id" value="42"&gt;
  &lt;input type="hidden" name="id" value="43"&gt;
  &lt;input type="hidden" name="id" value="51"&gt;
  &lt;input type="hidden" name="id" value="61"&gt;
  &lt;input type="hidden" name="excludefield" value="attachmentdata"&gt;
  &lt;input type="submit" value="XML" id="xml"&gt;
  &lt;/form&gt;
  </code></pre>
  </blockquote>
  
  <p>I tried to use requests. I tried code like this:</p>
  
  <pre><code>import requests
  values = { 'submit': 'xml'}
  req = requests.post('https://bugzilla.mozilla.org/buglist.cgi?bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;bug_status=CLOSED&amp;query_format=advanced&amp;resolution=---&amp;resolution=FIXED&amp;resolution=INVALID&amp;resolution=WONTFIX&amp;resolution=DUPLICATE&amp;resolution=WORKSFORME&amp;resolution=INCOMPLETE&amp;resolution=SUPPORT&amp;resolution=EXPIRED&amp;resolution=MOVED&amp;order=bug_id&amp;limit=10',data=values)
  print req.text
  </code></pre>
  
  <p>but I got errors.</p>
  
  <p>can someone help me to point out the right usage of requests? Thanks.</p>