Skip to content

Instantly share code, notes, and snippets.

@tcha-tcho
Last active July 26, 2025 00:24
Show Gist options
  • Save tcha-tcho/1ca76a95147b6168b4bffb1c363f93c5 to your computer and use it in GitHub Desktop.
Save tcha-tcho/1ca76a95147b6168b4bffb1c363f93c5 to your computer and use it in GitHub Desktop.
Scraps para advogados best lawyers
// Abra o console do inspector, cole isso e dê enter em cada página disponível
// Seleciona todos os elementos com a classe card-lawyer
document.querySelectorAll('.card-lawyer').forEach(card => {
// Dentro de cada card, seleciona o primeiro <a> que possui o atributo aria-label
const lawyerLink = card.querySelector('a[aria-label]');
// Obtém o valor do atributo aria-label
const lawyerName = lawyerLink ? lawyerLink.getAttribute('aria-label') : '';
// Dentro de cada card, seleciona o <a> com a classe firm-profile-link
const firmLink = card.querySelector('a.firm-profile-link');
// Obtém o texto do link (nome do escritório)
const firmName = firmLink ? firmLink.textContent.trim() : '';
// Imprime as informações no console
if (firmName) console.log(`${lawyerName.replace("'s Lawyer Profile","")} / ${firmName}`);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment