Skip to content

Instantly share code, notes, and snippets.

@pmarkun
Created July 17, 2013 17:18
Show Gist options
  • Save pmarkun/6022547 to your computer and use it in GitHub Desktop.
Save pmarkun/6022547 to your computer and use it in GitHub Desktop.
pjs.addSuite({
url: 'http://e-negocioscidadesp.prefeitura.sp.gov.br/ResultadoBusca.aspx#pRWfkdDwWjM%3d',
moreUrls: 'a:contains("Próximo >")',
scraper: function() {
var lista = [];
console.log($('a:contains("Próximo >")'));
$("#ctl00_cphConteudo_gdvResultadoBusca_gdvContent tr").each(function (index, data) {
soup = $(data).find("td");
var licitacao = {
"publicacao" : $(soup[0]).text(),
"licitacao" : $(soup[1]).text(),
"modalidade" : $(soup[2]).text(),
"dt_abertura" : $(soup[3]).text(),
"objeto" : $(soup[4]).text()
};
//console.log(licitacao);
lista.push(licitacao);
});
return lista; // variable set by Wikipedia
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment