Skip to main content

A Suite of Twitter Archival Tools

Project description

Twitter-Bookmark-Downloader

A CLI python application to download all media (and hopefully more) from all bookmarked tweets. Eventually I hope to make this a general archive utility for Twitter, allowing users to download/archive all kinds of tweets.

Originally, before the V2 Twitter API, this app used Selenium to try and scrape the contents of the a users bookmarks page. Now, since the release of the V2 API, the application has been rewritten. This new version is much faster and more robust.

Run

This software is only compatible with Python 3.9+.

TODO: Document how to create Twitter Developer App.

  1. Clone the repository

    $ git clone https://github.com/jarulsamy/twitter-bookmark-downloader
    $ cd twitter-bookmark-downloader
    
  2. Install the application with setuptools.

    $ python setup.py install
    
  3. Run the application

    $ twitter-archive
    

By default, the app will print a URL to prompt the user to authorize the application with Twitters official APIs. Once you navigate to that link and login with Twitter, the app will fetch a manifest of all the bookmarked tweets and begin saving any photos/videos to disk.

You can view the built-in CLI help menu for more info:

$ twitter-archive --help
Twitter Archival Tool

A CLI tool to archive tweets.

Usage:
    twitter-archive [options]

Options:
    -s, --skip                  Use the existing metadata file if possible.
    -o, --media-output=FILE     Path to output media    [default: ./media]
    -m, --metadata-output=FILE  Path to output metadata [default: ./bookmarks.json]
    --headless                  Don't use interactive authentication

    -h --help                   Show this help
    -v --version                Show version

Acknowledgements

The Twitter dev team did an excellent job on the new APIs. The new APIs are substantially more intuitive and allow us to interact with many more features of Twitter. While it did take two years, I appreciate the openness, transparency, and attention to feedback.

The relevant forumn post is available here.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

twitter-archive-0.0.2.tar.gz (50.7 kB view details)

Uploaded Source

Built Distribution

twitter_archive-0.0.2-py3-none-any.whl (33.1 kB view details)

Uploaded Python 3

File details

Details for the file twitter-archive-0.0.2.tar.gz.

File metadata

  • Download URL: twitter-archive-0.0.2.tar.gz
  • Upload date:
  • Size: 50.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for twitter-archive-0.0.2.tar.gz
Algorithm Hash digest
SHA256 e64bfd5bc86f4791d8bc19f3cfdd036b963bc49ed2ebf3e12629b36379ef718d
MD5 a6e4e332390d7fd37007d7a91958748e
BLAKE2b-256 65a5d68aa64d44b3c0f8d49eddd76ab3f36f2af6597f48ca5b7d2425071626ae

See more details on using hashes here.

File details

Details for the file twitter_archive-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for twitter_archive-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 36e97df84b437a5b7fb54bffd9456caa8a6384fd6f9b1ffa0ed58e5b7fa37833
MD5 8aed8cc0a91cb6194fb63d5ba40d9410
BLAKE2b-256 d8af4522230975a9c5305bb923f362a52fc7ebd3c36bcd72d4409ba6b8460378

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page