title: python request post doesn't submit
body: <p>I have a problem with request.post, instead of returning the html code with the results I get back the html code of the starting side. </p>
  
  <pre><code>import requests
  def test(pdb):
     URL = "http://capture.caltech.edu/"
     r = requests.post(URL,files={"upfile": open( pdb)})
     content=r.text
     print(content)
     print(r.headers)
  
  
  
  def main():
    test("Model.pdb")
  </code></pre>
  
  <p>Could it be that I have to define which postmethod I want to use? Because there are two in the html file. If this is the case how do I do that?(I want to use the second one.)</p>
  
  <pre><code>&lt;FORM ACTION="result.cgi" METHOD=POST&gt;
  &lt;form action="capture_ul.cgi" method="post" enctype="multipart/form-data"&gt;
  </code></pre>
  
  <p>I am aware that there are similar questions here but the answers there didn't help because the mistake was that params was used instead of files, which shouldn't be a problem here.</p>
  
  <p>Thanks in advance.</p>