Skip to content

Instantly share code, notes, and snippets.

@imakecodes
Created February 13, 2019 18:42
Show Gist options
  • Save imakecodes/a51abfbb48fa94796867738a6acf8584 to your computer and use it in GitHub Desktop.
Save imakecodes/a51abfbb48fa94796867738a6acf8584 to your computer and use it in GitHub Desktop.
import requests
data = {
'pagina': '0',
'tipo_consulta': '0',
'nr_inscricao': '123123',
'cbxadv': '1',
'id_tipoinscricao': '1',
'nome_advogado': '',
'parte_nome': '1',
'nr_cpf': '',
'idCidade': '0',
}
params = []
for key, value in data.items():
params.append('='.join((key, value)))
response = requests.post(
'https://www2.oabsp.org.br/asp/consultaInscritos/consulta_nr_advogado.asp',
headers={
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36',
'Referer': 'https://www2.oabsp.org.br/asp/consultaInscritos/consulta01.asp',
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
},
data='&'.join(params),
)
print(response.text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment