All Projects → Datamine → Archive-Tweets

Datamine / Archive-Tweets

Licence: other
Archive and Delete Liked and Posted Tweets

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Archive-Tweets

archive-explorer-web
Browse your Twitter archive with a friendly, responsive, full experience, and quickly delete the tweets you don't want.
Stars: ✭ 19 (-32.14%)
Mutual labels:  twitter, tweets, twitter-api
Twitterdelete
💀 Delete your old, unpopular tweets.
Stars: ✭ 231 (+725%)
Mutual labels:  twitter, tweets, twitter-api
TwitterPiBot
A Python based bot for Raspberry Pi that grabs tweets with a specific hashtag and reads them out loud.
Stars: ✭ 85 (+203.57%)
Mutual labels:  twitter, tweets, twitter-api
Twitter Scraper
Scrape the Twitter Frontend API without authentication.
Stars: ✭ 3,037 (+10746.43%)
Mutual labels:  twitter, tweets, twitter-api
Tweetie
Simple jQuery Twitter feed plugin
Stars: ✭ 314 (+1021.43%)
Mutual labels:  twitter, tweets, twitter-api
Twitter
Twitter API for Laravel 5.5+, 6.x, 7.x & 8.x
Stars: ✭ 755 (+2596.43%)
Mutual labels:  twitter, tweets, twitter-api
Linqtotwitter
LINQ Provider for the Twitter API (C# Twitter Library)
Stars: ✭ 401 (+1332.14%)
Mutual labels:  twitter, tweets, twitter-api
Twitter Post Fetcher
Fetch your twitter posts without using the new Twitter 1.1 API. Pure JavaScript! By Jason Mayes
Stars: ✭ 886 (+3064.29%)
Mutual labels:  twitter, tweets, twitter-api
TwitterAutoReplyBot
This is a tiny Python script that replies to a specified number of tweets containing a specified hashtag.
Stars: ✭ 33 (+17.86%)
Mutual labels:  tweets, twitter-api
stweet
Advanced python library to scrap Twitter (tweets, users) from unofficial API
Stars: ✭ 287 (+925%)
Mutual labels:  tweets, twitter-api
shut-up-bird
🐦 Put your tweets/likes in an EPUB and delete them like a boss
Stars: ✭ 22 (-21.43%)
Mutual labels:  twitter, twitter-api
Egg Mode
a twitter api crate for rust
Stars: ✭ 249 (+789.29%)
Mutual labels:  twitter, twitter-api
bird-elephant
PHP client library for Twitter API v2 endpoints.
Stars: ✭ 28 (+0%)
Mutual labels:  twitter, twitter-api
awesome-twitter-bots
A Curated Collection of the Best Twitter Bots 🤖
Stars: ✭ 99 (+253.57%)
Mutual labels:  twitter, tweets
Harpy
A Twitter app built with Flutter
Stars: ✭ 211 (+653.57%)
Mutual labels:  twitter, twitter-api
tweet-delete
Self-destructing Tweets so you too can be cool 😎
Stars: ✭ 68 (+142.86%)
Mutual labels:  tweets, twitter-api
Tweetledee
A PHP library that provides an incredibly easy way to access Twitter data as JSON or RSS feed by URL or standard CLI syntax.
Stars: ✭ 208 (+642.86%)
Mutual labels:  twitter, twitter-api
nitter scraper
Scrape Twitter API without authentication using Nitter.
Stars: ✭ 31 (+10.71%)
Mutual labels:  tweets, twitter-api
SMMT
Social Media Mining Toolkit (SMMT) main repository
Stars: ✭ 116 (+314.29%)
Mutual labels:  tweets, twitter-api
detweet
delete tweets en masse
Stars: ✭ 14 (-50%)
Mutual labels:  twitter, tweets

Archive-Tweets

This is a command-line tool written in Python 2.7, to archive or delete all tweets that you have posted, or that you have liked. It is optionally possible to also archive all attached media (images, etc.)

Use

Windows: set up a UNIX-compatible interface, like Cygwin. Then follow the Linux/OSX instructions below.

Linux/OSX: Open your terminal, clone this repo, pip install requirements.txt. This software will need to authenticate with Twitter, so you'll need to create an app on Twitter and insert the credentials obtained into the credentials.txt file.

Then you can run the script. I suggest using -W ignore to suppress SSL warnings. There are several flags:

  • --posted to indicate that you want to select the tweets you have personally made/retweeted
  • --liked to indicate that you want to select the tweets you have liked
  • --archive to indicate that you want to download the selected tweets
  • --delete to indicate that you want to delete the selected tweets (un-like in the case of --liked)
  • --media to indicate that if you're archiving tweets, you also want to save their media attachments (images, etc.)

You may select only one of --posted and --liked at a time, not both. The --media flag requires the --archive flag: you can only archive the media attachments if you're already archiving the tweets in the first place.

Some examples of correct use:

$ python -W ignore TwitterTool.py --archive --media --liked
$ python -W ignore TwitterTool.py --archive --delete --posted

The software then creates a folder, Archive-Liked-Tweets or Archive-Personal-Tweets, depending on whether you selected --liked or --posted, respectively, and within that, creates a new folder for every tweet, with the path name given by the timestamp of the tweet's publication and the tweet's unique identifier. Within every tweet's folder is the pretty-printed .json object representing the tweet, as well as any attached media files, if the option to download them was selected.

Rate Limits

Since this software is reliant on the Twitter API, the rate limits apply:

With these generous limits in place, you should find it possible to handle your entire timeline rather swiftly. Should you hit a rate limit, the app will simply sleep until the fifteen minute period is over.

Display

Display of tweets has not been a priority in development so far. I believe there are other Open-Source projects that have done a reasonable job at this, which you can adapt straight-forwardly. (I'd be happy to accept a PR that generates pages rendering the archived tweets. It is my plan to do this eventually.)

To search all the tweets in a directory for some text, cd into the relevant directory, and then use: grep -rnw . -e "<your text here>" e.g. grep -rnw ./Archive-Liked-Tweets -e "rice pudding"

Notes

  • The tool relies on the Python-Twitter library, which provides a helpful wrapper around Twitter's API. Duly note that Twitter makes changes to their API once in a while (months/years), which makes it possible for the objects that the API functions (api.GetUserTimeline, api.GetFavorites, etc.) return to be erroneous.

To avoid such errors, you should run this tool from the REPL and make a few calls to the API, and double-check the JSON objects that you get against the Twitter API. The documentation for every endpoint has examples of the returned objects.

Example of REPL use:

>>> from TwitterTool import *
>>> api = credentials_and_authenticate()
>>> api.GetStatus(824666495305162752).__dict__['_json']                             
>>> api.GetUserTimeline(count=1)
  • One frequent Twitter pattern is the posting of threads or tweetstorms, which this software currently does not handle automatically. You'd have to like all the tweets in a tweetstorm to archive all of them. It would be more convenient if you could just like the first one, and the software also grabs the rest for you. This is a bit of an inconvenience. and it's a currently open issue.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].