Skip to content

Instantly share code, notes, and snippets.

@dctalbot
Last active September 12, 2021 09:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dctalbot/f93e0b3bc1a7df59c7bca8723c2b8f4d to your computer and use it in GitHub Desktop.
Save dctalbot/f93e0b3bc1a7df59c7bca8723c2b8f4d to your computer and use it in GitHub Desktop.
twitter: delete all liked tweets

One gap in twitter's API is the ability to unlike tweets, so here we are doing it manually

  1. Navigate to twitter.com/<insert username>/likes
  2. Copy and paste this script into console
  3. Wait for script to finish
setInterval(() => {
  try {
    document.querySelector('[data-testid="unlike"]').click()
    console.log('clicking')
  } catch {
    window.scrollBy(0, 200)
    console.log('scrolling')
  }
}, 500)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment