Archive your favorite twitter account with all its media contents.
- Photo
- Video
- Animated GIF
This project was using Twint but has now shifted to Twitter's front-end API and GraphQL API
- install
youtube-dl
withpip install youtube-dl
- install
requests
withpip install requests
- find your GraphQL endpoint and Bearer token from Twitter (details below)
- edit
main.py
and put your GraphQL endpoint and Bearer token accordingly - optional: if you want to store archived tweets(json, image and video) to directory other than
data
you need to change it inmain.py
andbase.py
- open any twitter user's profile (e.g. https://twitter.com/realDonaldTrump)
- right-click anywhere in your browser and select inspect (for Chrome. other browser may have different naming)
- go to
Network
tab. selectXHR
as the filter - find a
GET
call toUserByScreenName
endpoint. you may need to refresh the page for network inspector to record - the request url will have the format like this
graphql/YOUR_GRAPHQL_ENDPOINT/UserByScreenName?
copy the graphql endpoint - the request headers will have an
authorization
header with format like thisBearer YOUR_BEARER_TOKEN
copy the bearer token
- 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