Giter Club home page Giter Club logo

twitter_archiver's Introduction

Twitter Archiver

Archive your favorite twitter account with all its media contents.

Supports

  • Photo
  • Video
  • Animated GIF

Changes

This project was using Twint but has now shifted to Twitter's front-end API and GraphQL API

Usage

  1. install youtube-dl with pip install youtube-dl
  2. install requests with pip install requests
  3. find your GraphQL endpoint and Bearer token from Twitter (details below)
  4. edit main.py and put your GraphQL endpoint and Bearer token accordingly
  5. optional: if you want to store archived tweets(json, image and video) to directory other than data you need to change it in main.py and base.py

Find your GraphQL endpoint and Bearer token

  1. open any twitter user's profile (e.g. https://twitter.com/realDonaldTrump)
  2. right-click anywhere in your browser and select inspect (for Chrome. other browser may have different naming)
  3. go to Network tab. select XHR as the filter
  4. find a GET call to UserByScreenName endpoint. you may need to refresh the page for network inspector to record
  5. the request url will have the format like this graphql/YOUR_GRAPHQL_ENDPOINT/UserByScreenName? copy the graphql endpoint
  6. the request headers will have an authorization header with format like this Bearer YOUR_BEARER_TOKEN copy the bearer token

TODO

  • add config file for more flexible configuration
  • add ability to view follower-only content (has to be logged in)
  • store retweeted media in tweeter's directory
  • add logger for different level of log output
  • add fronend for archived tweets management

twitter_archiver's People

Contributors

mylylyl avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.