A self-hosted, Pinterest-like web app for viewing Twitter/X media locally. The app obtains your liked tweets, and allows you to browse them in a grid-view.
You can choose to download all images, caching them locally - or receive them directly from Twitter/X's API.
- Pinterest-style grid layout for much easier browsing of your Twitter/X Likes.
- Automatic media download: Saves tweet images and user avatars for offline access.
- Privacy blur: For detected sensitive media.
- Never share your credentials. They are only used to authenticate to Twitter / X.
- Leaving
DOWNLOAD_IMAGESset totruereduces repeated remote fetches and lowers rate‑limit risk. - Images are converted to WebP to save space.
- Data (tweets + media) updates only when you click the Refresh button. It is recommended to use this feature sparingly to avoid Twitter/X rate limitations
Python 3.9+ is recommended.
pip install -r requirements.txtEdit config.json:
USER_IDHEADER_AUTHORIZATIONHEADER_COOKIESHEADER_CSRFDOWNLOAD_IMAGES(boolean)
How to obtain them:
- Open Twitter / X in a desktop browser and go to your Likes page.
- Open DevTools (F12), Network tab.
- Filter for requests containing
/Likes. - Select a request to
https://x.com/i/api/.../Likes. - Copy headers:
authorizationx-csrf-token- full
cookiestring
- Find your numeric
userIdin the request payload or URL. - Paste into
config.json.
If your cookie string contains double quotes, escape them with a backslash (\").
Launch the server:
python gallery_server.pyA browser tab will open at:
http://localhost:8000/index.html
Click Refresh to fetch new likes and (optionally) download new media.
Use responsibly and only for personal archival / viewing of your own liked content.
