title: Using urllib2 in Python
body: <p>I am trying to do the following via python:</p>
  
  <p>From this website:
  <a href="http://www.bmf.com.br/arquivos1/arquivos_ipn.asp?idioma=pt-BR&amp;status=ativo" rel="nofollow">http://www.bmf.com.br/arquivos1/arquivos_ipn.asp?idioma=pt-BR&amp;status=ativo</a></p>
  
  <p>I would like to check the 4th checkbox and then click on Download image.</p>
  
  <p>That is what I did:</p>
  
  <pre><code>import urllib2
  import urllib
  url = "http://www.bmf.com.br/arquivos1/arquivos_ipn.asp?idioma=pt-BR&amp;status=ativo"
  payload = {"chkArquivoDownload3_ativo":"1"}
  data = urllib.urlencode(payload)
  request = urllib2.Request(url, data)
  
  print request
  
  response = urllib2.urlopen(request)
  contents = response.read()
  
  print contents
  </code></pre>
  
  <p>Does anyone have any suggestions?</p>