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

201
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
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