lyfhael / deletetweets Goto Github PK
View Code? Open in Web Editor NEWDelete / Remove all your tweets
License: MIT License
Delete / Remove all your tweets
License: MIT License
Error occurs at VM182:32, which is the colon at
"old_tweets":false
Does this script need configuration to support arabic ?
Or do i need to change the value in buildAcceptLanguageString()
I need to delete specific tweets with specific keyword from my account
appretiate the Help
Hi, im fairly new to this. Can you explain in detail how i can use the archive to delete all of my tweets? thanks
It will say it went through like 2403 tweets but none of them actually get deleted. Only the non archive version deletes tweets and gets rate limited after a bit of time
hello
i started the script and it deleted all my tweets from the tweet tab
but there is still tweets from reply and media tab how do i remove them?
Thank you
Hi,
This is actually not an issue but an idea. I am wondering if we can achieve the same thing to remove likes using https://twitter.com/i/api/graphql/ZYKSe-w7KEslx3JhSIk5LA/UnfavoriteTweet
api.
Best regards.
would be nice to add the feature or new tool for delete retweets and likes
I would like to stop the script from running to try and save an old tweet I forgot to include. How can I do this if at all
VM368:124 Uncaught TypeError: entries is not iterable
at log_tweets (anonymous:123:19)
at anonymous:266:15
Unsure what caused this; acquired all variables as intended and nothing came of it.
Each instance of anonymous was wrapped in <>s. Unsure if this necessary information.
the script seems to be un-retweeting just fine but even with old tweets set to true, i'm still able to find my old posts through advanced search. i'm using archive files for this, and i also tried dropping the other files i got in my zip, to no success (depending on the file and date range set, it either catches the same set of (already deleted) retweets every time or nothing at all)
i came across another script that uses tweet-headers.js instead, but i'm hesitant to use it since it erases everything and i'd like to keep my last 2 years' worth; do you know if dropping that file into yours will work too?
Hello,
when i try to execute, this is what i get
Access to fetch at 'https://twitter.com/i/api/graphql/[...]_download_video_enabled%22%3Afalse%2C%22responsive_web_enhance_cards_enabled%22%3Afalse%7D' from origin 'https://x.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Thanxs
Hi!
First I want to thank you for this amazing tool because i was able to delete some 60k tweets thanks to it using the archive method. However, some 7k tweets remain untouchable. Eventually every two weeks or so some of these tweets pop up on my profile, but since it's on mobile I'm forced to delete them by hand. When I download my updated archive, these tweets and medias are showing, but after running the script it just says deletion complete without any tweets being deleted.
Is there a way I can solve this or am I forced to wait until these old tweets pop up and delete them by hand? I want to use this old account as a professional account, and I don't want to start using it if i have to check twice a day whether older tweets are showing up or not right below my newer tweets.
Thank you in advance and have a nice day!
Hi! I just want to ask what to do since every time i upload my tweets.js file, it says this
Would it be possible to add an option to unlike tweets?
Thank you! And thank you for your awesome JS! It helped me a lot!
MIT would be awesome! Thanks :)
In async function delete_tweets, you set client language as fr. You can remind us to change it or make that string a variable that we can fill (and define widespread languages like english, french, german etc)
And good news. It works well in any chromium based browser. Just don't exceed 3750 tweets/day and no one gets banned
Hi, I see some other people have gotten this error but haven't seen a solution for it yet, so sorry if I just missed that (or if the solution is something obvious to people with more coding experience than me). I've tried the script in firefox and chrome on all of ubuntu, arch, and windows (updating the IDs &c in each, not just copy/pasting from one browser into another), and gotten the same "entries is not iterable" error. Just above is "VM328:119 undefined" (pointing to "console log(entries)"); "log tweets (:124:19)" is pointing at "for (let item of entries) {", and ":267:15" is pointing at "next = await log_tweets(entries);"
This is the code I'm using with identifying stuff removed; aside from copying in authorisation and IDs I also changed 'unretweet' to true and added items to 'tweets_to_ignore'
Is this script meant to remove RTs, or is that a function that is not yet built in OR that has to be toggled somewhere?
Apologies if this is not the correct way to do this. It is exactly my second post on a GitHub thing. Thank you for the script, though. It is beautiful.
Hello,
The tool looks awesome, but do you plan to add a filter in order to filter tweets with a maximum of X likes ?
with the delete tweets script , i get prompted with this after a little while with it saying "rate limit reached . waiting 1 minute" over and over again .
any way to fix this ?
When the script is run in the console, it returns with the following error:
VM173:122 Uncaught TypeError: entries is not iterable at log_tweets (<anonymous>:121:19) at <anonymous>:264:15
Below is a copy of the script as I had run it, with my own values removed:
All of my inputs corresponded to the IDs specified in the comments. Beyond that, no changes have been made to the script. Replicated 10 times on Chromium 116.0.5845.110 on Ubuntu 22.04.
Hi! thanks for this script. It worked great to delete all my tweets. I would love to do the same but to unlike all the tweets I've liked.
my page looks empty but it says that i still have over 4000 tweets. when i log onto another account and look at the page i can see some of the tweets and i realize that they're all replies to myself. the original tweets are gone but the rest of the threads are still there.
Apologies for something so immensely stupid, but it's my first time with javascript.
I have followed the howto, replaced the auth token, set the settings.
Now how do I actually run this code? Do I paste it into the browser console? Or run with node.js? Or with tampermonkey?
Is there some button to load a local file in chromium?
Fantastic job creating the script, it works wonderfully!
However, I would really like to remove all my likes and media as well from my account, I don't see a way of enabling this in the script.
Many thanks! :)
Hi, thanks for this project.
It would be really great if one could filter the tweets to delete depending on the date. For example, being able to set a rule like «delete all the tweets older than 6 months».
In Firefox (125.0.2), the script throws the error:
Uncaught SyntaxError: await is only valid in async functions, async generators and modules
Which can be resolved by wrapping the whole script in an async IIFE:
(async () => { SCRIPT_HERE })();
But doing so results in a different error:
Uncaught (in promise) TypeError: navigator.userAgentData is undefined
In Safari (17.3.1), it throws:
SyntaxError: Unexpected identifier 'sleep'
Just want to throw this out there since, in the prerequisites, you mention that you use Chrome but expect it to work elsewhere.
The script did work as expected for me in Chrome (124.0.6367.119). All of this was done on an M3 MacBook Pro running Sonoma 14.3.1.
Okay. I have A LOT of tweets to erase. More than 250K tweets so my archive tweets.js
are divided in at least 5 more parts, each with a size of 100M.
The thing is, the script will consistently erase only 16379 of the N tweets present on the archive since after reaching that number the Chrome tab will crash with the next message:
debugging connection was closed | reason: render process gone
I've been able to keep deleting my tweets running twitter_archive_content = twitter_archive_content.slice(0,-16378);
a couple times after each crash. I think that a quick solution could be adding an option to set the number of tweets from which where to start the tweet deletion loop counter, so that one could continue from where it stopped last time. I could do a PR with the fix if needed.
PS: Thanks for the script! it works wonders and it's pretty easy to follow.
I'd like to keep around an "I delete tweets" pinned tweet.
hi, can you please add an option to unlike tweets too?
everything still works like a charm. thank you. but it doesn't seem to delete replies to tweets or tweet replies. only deletes tweets made to be posted on profiles...
Hi there,
Thanks for the really useful tool, but I've hit a problem where it doesn't seem to be able to remove any tweets that were made before the middle of 2018. On the console, it counts down (3) ..., (2) ..., (1)..., DELETION COMPLETE, but even though there are no errors my very old tweets remain.
I'm using the latest version of Chrome (116.0.5845.180).
Let me know what info you need from me to reproduce/debug.
Best,
-Sam
I don't see the X-Client-Uuid header anywhere.
x-client-uuid or "client_uuid" can no longer be retrieved from any file Twitter serves.
Any idea how to fix this error?
I'm curious to hear your experience and recommended approach re: rate limiting. I hit the wall at approximately 5 mins.
Hey there, hope this is not bad Github etiquette but:
I noticed this script works really well using the twitter archive's tweets.js file except it was failing to delete about 200 old tweets. After some research, I realized it was skipping over my replies to myself in long threads. It would delete the original post but not my replies to myself.
During a boring work meeting, I decided to test something after comparing tweets that weren't deleted to ones that were.
I edited the tweets.js file and deleted every row that contained "in_reply_to". This originally threw an error and then I realized this left some dangling commas on the "lang : en" lines if there were no "extended_entries" after. So after some painstaking surgery to remove those, the file was accepted and about 80% of the missed tweets were then deleted. (see screenshot attached)
There's still some stragglers but they are so old I am struggling to even find them to compare. Anyway, just wanted to let you know my process in case anyone is still working on this script or wants to recreate my fix. I don't know if the script can be modified to ingest these replies-to-replies but if not, here's my solution for others. Thanks for the great script!
{"errors":[{"message":"Could not authenticate you","code":32}]}
I was having trouble getting tweets before 2023 to delete, so enabled old_tweets
along with my before_date=2023-01-01
. After the script ran, pretty much all of my tweets/replies/retweets were gone (it somehow missed a few from the last couple weeks).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.