Skip to content

Instantly share code, notes, and snippets.

@alissonfpmorais
Last active September 25, 2018 18:13
Show Gist options
  • Save alissonfpmorais/53221368071da3eb9f0e9f7414bc8821 to your computer and use it in GitHub Desktop.
Save alissonfpmorais/53221368071da3eb9f0e9f7414bc8821 to your computer and use it in GitHub Desktop.
search remote jobs on geekhunter.com.br
/**
* O uso é bem simples, basta seguir os passos:
* 1) Entre no site https://www.geekhunter.com.br/lista-empresas
* 2) Selecione quaisquer filtros que deseje aplicar a pesquisa;
* 3) Role até o final da página (para carregar todos as vagas correspondentes);
* 4) Cole o código abaixo no console do seu navegador;
* 5) Execute o código!
*
* Continuarão na lista apenas as vagas remotas
**/
function removeNonRemote(parent, child, totalNode) {
try {
const isRemote = child.childNodes[1].childNodes[3].childNodes[9].childNodes[3].childNodes[1].textContent == ' Não'
if (isRemote) {
parent.removeChild(child)
totalNode.textContent = (totalNode.textContent.split(' ')[0] - 1) + ' empresas'
}
} catch (e) {
console.log('Problems to remove child!')
console.log('error: ' + e)
}
}
const totalCompanies = document.querySelector('h3.inline')
const companiesPanel = document.querySelector('.left-section')
const companies = document.querySelectorAll(".panel-default")
companies.forEach(company => removeNonRemote(companiesPanel, company, totalCompanies))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment