Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

150
Visualizações
LinkedIn fails to update LIKE button accordingly after each click()

I wrote the following code to automatically 'LIKE' all of the comments on a LinkedIn post using a randomized wait time.

The code can find all of the 'LIKE' buttons and can click on them however, the page will only update all of the 'LIKE' buttons after the full code has been executed

IN SHORT: The page DOES NOT update the 'LIKE' button after each click() has been executed.

QUESTION: I do not know but does the LinkedIn page fail to update after each click() or is my code running all of the click() executing at the same time?

I am trying to avoid all the click() at the same time

// WAIT FUNCTION
function wait(ms){
   var start = new Date().getTime();
   var end = start;
   while(end < start + ms) {
     end = new Date().getTime();
  }
}

// RANDOMIZE WAIT TIME
function randomNumber(min, max) {
  return Math.floor(Math.random() * (max - min + 1)) + min;
}

// ADD ALL LIKE BUTTONS TO LIST
let likeButtons = document.querySelectorAll('.artdeco-button__text.react-button__text')

// LOOP LIKE ACTION
likeButtons.forEach(likeButton =>{

  // DO CLICK
  console.log("likeButton.click()");
  likeButton.click();

  // ACTIVE WAIT
  var waitTime = randomNumber(1000,4000);
  console.log("wait time is "+ waitTime);
  wait(waitTime);


  }
)

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda