A Python utility for downloading media from X (formerly Twitter) using the GraphQL API.
- Python 3.12+
requestslibrary
- Clone this repository
- Install dependencies:
uv pip install -r pyproject.tomlpython main.py --cookie "your_cookie_here" --user "username"--cookie: Authentication cookie from X (required to set on first run)--user: Username to download media from
The authentication cookie will be saved to cookie.txt after first use, so you don't need to provide it on subsequent runs.
This tool is for educational purposes only. Please respect X's terms of service and API usage guidelines.
This project is licensed under the MIT License - see the LICENSE file for details.