Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

185
Vistas
Unfollow Users on Twitter through Javascript on console. Automation to show new users isnt working (everything appears at the same time)
let btns = document.querySelectorAll("[data-testid]")
let unfollowBtns = Array.from(btns).filter(btn => {
    return btn.getAttribute('data-testid').includes('unfollow')
})

for (let i = 1; i <= unfollowBtns.length; i++) {
    setTimeout(() => {
        unfollowBtns[i-1].click()
        setTimeout(() => {
            document.querySelector("[data-testid='confirmationSheetConfirm']").click()
        }, 500);
    }, 1000 * i);
}

Maybe Im not aware how things work in Javascript client side. If I try, at the end of the loop, to include something like:

window.scrollTo(0, document.body.scrollHeight);

and insert everything inside another loop, everything appears to happen at the same time.

Any suggestions? Thanks.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda