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.
Hi,
I get this error:
Traceback (most recent call last): File "/Users/felipe/Documents/deltwitt.py", line 26, in <module> CONSUMER_KEY = from_env('xxxxxxxxxxxxxxxx') File "/Users/felipe/Documents/deltwitts/deltwitt.py", line 20, in from_env raise ValueError(f"Env variable {key} must be provided") ValueError: Env variable xxxxxxxxxxx must be provided
and, I inserted all the keys ....
Cheers,