This script it based on @chrisalbon's original script, but instead of fetching the users timeline via the Twitter API it uses the archive of the users data to workaround the 3200 tweet limitation.
- Create a virtualenv
- Run
pip install -r requirements.txt
- Create a Twitter developer app.
- Download an archive of your Twitter data from Twitter. (link)
- Copy
data/tweet.js
to your working directory and call the fileall-tweets.json
. - Remove the
window.YTD.tweet.part0 =
part of the first line of the file.
- Set the environment variables
TWITTER_CONSUMER_KEY
,TWITTER_CONSUMER_SECRET
,TWITTER_ACCESS_TOKEN
, andTWITTER_ACCESS_SECRET
. - Run
python wipe.py
- ?
- Profit
- This process could be made faster with
multiprocessing
or threads to be faster.
Are you sure you actually managed to add all keys? That exception is only thrown if any are missing, in your case
TWITTER_CONSUMER_KEY
.I'd suggest adding
print(os.environ)
on line 24 and checking the output carefully