title: Python: Sending POST request doesn't work
body: <p>I'm trying to scrape a webpage sending POST to fill a form, generally I use selenium to scrape a page with python, but I recently read that sending a POST request is a better way to scrape results. Anyway, I followed some instructions for make my code, but when I post my data, I get the same page with the form filled (the POST doesn't submit the form), what I'm doing wrong? Also the same page has another form to fill after the first, so if I achieve fill the first form I really don't know how to keep that response for get the final response, so if someone can help with some ideas, I reall would appreciate it! Thanks and I include my code and the page that I'm looking for scrape final quotation:</p>
  
  <p><a href="https://www.santander.cl/cotizador-web/" rel="nofollow noreferrer">https://www.santander.cl/cotizador-web/</a></p>
  
  <pre><code>import requests, lxml.html
  import time
  
  s = requests.session()
  login = s.get('https://www.santander.cl/cotizador-web/cotizador/pasosSolicitud.xhtml')
  login_html = lxml.html.fromstring(login.text)
  hidden_inputs = login_html.xpath(r'//form//input[@type="hidden"]')
  form = {x.attrib["name"]: x.attrib["value"] for x in hidden_inputs}
  
  form['pasosForm:marcas']='27'
  form['pasosForm:modelos']='1978'
  form['pasosForm:ano']='2015'
  form['pasosForm:uso']='1'
  form['pasosForm:j_id93373712_1a32e354_input']='on'
  form['formDialogCotiSelec:j_id216370348_64c01a10_active'] = '1'
  form['javax.faces.partial.execute']='pasosForm pasosForm:siguiente1'
  
  response = s.post('https://www.santander.cl/cotizador-web/cotizador/pasosSolicitud.xhtml', data=form)
  print(response.text)
  </code></pre>