Skip to content

Instantly share code, notes, and snippets.

@canassa
Last active August 29, 2015 14:06
Show Gist options
  • Save canassa/ab41408f6a07d2d85b5e to your computer and use it in GitHub Desktop.
Save canassa/ab41408f6a07d2d85b5e to your computer and use it in GitHub Desktop.
Exporta os dados de rede referenciada do site da Porto Seguro Saúde.
// Nao esqueca de mudar o iframe no console do Chrome antes de rodar.
// Com os dados impressos pelo console.log, importe eles no
// http://batchgeo.com/
console.log("City\tState\tAddress\tZip\tName\tPhone Number");
$('#pnResult').find('table.tabela_dados').each(function() {
var a = {
"address": $(this).find('th:contains("Endereço")').next().text(),
"name": $(this).find('th:contains("Razão Social")').next().text(),
"cep": $(this).find('th:contains("CEP:")').next().text(),
"phone": $(this).find('th:contains("Telefone:")').next().text(),
};
console.log("são paulo\tSP\t", a.address, "\t", a.cep, "\t", a.name, "\t", a.phone);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment