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

202
Vistas
Delete all tweets from personal twitter account

My Twitter account has been hacked and a scam posted about 500 scam-tweets from it.

The task: delete all tweets with JS in DevTools.

My solution:

const tweets = document.querySelectorAll('[data-testid="tweet"]')
for (let i = 0; i<= tweets.length; i++) {
   //1. Click on a tweet to show the tweet-menu:
   setTimeout(() => {tweets[i].querySelector('[aria-label="More"]').click()}, 1000)

   //2. Click on delete option:
   setTimeout(() => {document.querySelector('[role="menuitem"]').click()}, 1000)

   //3. Approve deleting in popup:
   setTimeout(() => {document.querySelector('[data-testid="confirmationSheetConfirm"]').click()}, 1000)
}

Problems:

  1. We need to scroll for more tweets and only then run it again.
  2. Each step (1,2,3) is not waiting for the previous to end running.
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I think what you are looking for is the Twitter API, you can find the documentation here: Twitter Developer API

It allows you to log into your account with your API Key and post, delete and do basically everything with your account using code.

Alternatively, there is already a web application for bulk deleting tweets: TweetDelete

about 4 years ago · Juan Pablo Isaza Denunciar
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