title: Retrieve data from web app - POST request
body: <p>Suppose that you have a web app, let's say a Django application.</p>
  
  <p>You need to retrieve data from a javascript button which is located on another remote website.</p>
  
  <p>Like this one <a href="http://www.cne.gob.ve/web/index.php" rel="nofollow">cne</a> On <strong>Consulte sus Datos Registro Electoral</strong> section, you see there is a button to search for a given number.</p>
  
  <p>It has this function attached:</p>
  
  <pre><code>&lt;form name="formulario_rep" method="post" action="javascript:BuscaRE_CE(document.formulario_rep.nacionalidad.value, document.formulario_rep.cedula.value)"&gt;
      &lt;table class="consulta_re" cellpadding="0" cellspacing="0"&gt;
      &lt;tbody&gt;&lt;tr&gt;
          &lt;td colspan="2" align="center" class="titulo_consulta_re"&gt;Consulte sus Datos&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td colspan="2" align="center" class="subtitulo_consulta_re"&gt;Registro Electoral&lt;/td&gt;
      &lt;/tr&gt;
  
              &lt;tr&gt;
          &lt;td width="20" align="right"&gt;
              &lt;select name="nacionalidad" class="formulario"&gt;
              &lt;option value="V"&gt;V&lt;/option&gt;
              &lt;option value="E"&gt;E&lt;/option&gt;
              &lt;/select&gt;
          &lt;/td&gt;
          &lt;td width="32" align="left"&gt;
              &lt;input name="cedula" type="text" class="formulario" maxlength="8" size="8" value="Cédula" onfocus="javascript:clear_textbox2();" onblur="javascript:Validar_Numero(document.formulario_rep.cedula);"&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td colspan="2" align="center"&gt;
              &lt;input type="submit" value="Buscar" class="boton"&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
                      &lt;tr&gt;&lt;td height="8"&gt;&lt;/td&gt;&lt;/tr&gt;
      &lt;/tbody&gt;&lt;/table&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p>However, I'll need to load this from a Django template, suppose I have another form into my template, when a person puts a number on my field, I need to do this very same request from my app, to the remote form, to see if numbers are valid or not, is there a way to do this?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I have this code which validates data from another website:</p>
  
  <pre><code>def validate_vat(government_id, is_company):
      if government_id[0] == 'J' or government_id[0] == 'V':
          # Check on SENIATs page
          # TODO: What happens if this site is offline??
          url = 'http://contribuyente.seniat.gob.ve/getContribuyente/getrif?rif='
          s = requests.get(url + government_id).text
          if s.startswith('450'):
              raise ValidationError(_('ERROR: ' + s))
  
      elif is_company:
          raise ValidationError(_('Companies must provide VAT Numbers'))
  
      else:
          raise ValidationError(_("RIFs should start with either a "
                              "'J' or a 'V'"))
  
      return True
  </code></pre>
  
  <p>If you go to  <a href="http://contribuyente.seniat.gob.ve/getContribuyente/getrif?rif=" rel="nofollow">this address</a> and put for example V147452787, so the url will be <a href="http://contribuyente.seniat.gob.ve/getContribuyente/getrif?rif=V147452787" rel="nofollow">new url</a></p>
  
  <p>You see data shown there, I call this from django and validates the field with no problems, now, I need to do the very same thing but with that button from cne website.</p>
  
  <p>I've found this url:</p>
  
  <p><a href="http://www.cne.gob.ve/web/registro_electoral/ce.php?nacionalidad=&amp;cedula=" rel="nofollow">Cne's empty url</a> If you add data like <a href="http://www.cne.gob.ve/web/registro_electoral/ce.php?nacionalidad=V&amp;cedula=13253899" rel="nofollow">this</a></p>
  
  <p>Then you see some info, that is what I'm looking for...</p>