A cross-platform desktop application for downloading media from X.com tweets, built with Rust and Tauri.
- 📥 Download images and videos from X.com tweets
- 🌐 Support for network proxies
- 💻 Cross-platform support (Windows, macOS, Linux)
- 🖥️ Intuitive GUI interface
- 📋 Command-line interface for automation
- 🔒 Secure authentication with X.com API
- ⏱️ Real-time download progress tracking
- 📁 Automatic file organization
-
Clone the repository:
git clone <repository-url> cd x-player
-
Build the application:
cargo tauri build
-
The built application will be located in:
- macOS:
target/release/bundle/macos/X Player.app - Windows:
target/release/bundle/msi/X Player.msi - Linux:
target/release/bundle/appimage/X Player.AppImage
- macOS:
- Launch the application
- Enter your X.com authentication tokens (auth_token and bearer_token)
- Configure proxy settings if needed
- Enter a tweet URL or ID
- Click "Fetch Media" to retrieve media from the tweet
- Click "Download" to save media to your specified directory
Use the -c or --cli flag to run in command-line mode.
Usage:
x-player [OPTIONS]
Options:
-i, --input <INPUT> Tweet URL or ID (CLI mode only)
-a, --auth-token <AUTH_TOKEN> Authentication token [env: X_AUTH_TOKEN]
-p, --proxy <PROXY> Proxy URL (e.g. http://127.0.0.1:7897) [env: X_PROXY]
-o, --output <OUTPUT> Output directory [default: .]
-c, --cli Run in CLI mode (disable GUI)
-h, --help Print help
-V, --version Print version
Download media from a tweet URL:
x-player -c -i "https://x.com/user/status/1234567890123456789" -a "your-auth-token" -o ./downloadsUsing environment variables for authentication:
export X_AUTH_TOKEN="your-auth-token"
x-player -c -i "1234567890123456789" -o ./downloadsUsing a proxy:
x-player -c -i "1234567890123456789" -a "your-auth-token" -p "http://127.0.0.1:7897" -o ./downloadsTo use this application, you need to obtain the auth_token from X.com:
- Log in to X.com in your browser
- Open Developer Tools (F12)
- Go to the Network tab
- Refresh the page
- Find a request to
x.comand extractauth_tokenfrom cookies
The auth_token is required to access the X.com API. The application uses a fixed Bearer token internally.
The application stores its configuration in a platform-specific location:
- macOS:
~/Library/Preferences/com.example.x-player.plist - Windows:
C:\Users\<username>\AppData\Roaming\x-player\config.json - Linux:
~/.config/x-player/config.json
The application is structured into several modules:
src/main.rs: Entry point with CLI argument parsingsrc/lib.rs: Tauri application setup and command handlerssrc/x.rs: X.com API client and media extraction logicsrc/media.rs: Media types and download functionalitysrc/config.rs: Configuration managementsrc/download_manager.rs: Download task managementsrc/utils.rs: Utility functionsdist/index.html: GUI interface
- Authentication failed: Ensure your auth_token and bearer_token are valid and not expired.
- Network errors: Check your internet connection and proxy settings.
- Download failures: Verify FFmpeg is installed and accessible in your PATH.
- API errors: X.com API changes may require application updates.
Application logs are available in the following locations:
- macOS:
~/Library/Logs/x-player.log - Windows:
C:\Users\<username>\AppData\Roaming\x-player\logs\x-player.log - Linux:
~/.config/x-player/logs/x-player.log
Contributions are welcome! Please feel free to submit a Pull Request.
-
Install dependencies:
cargo install tauri-cli
-
Run the application in development mode:
cargo tauri dev
-
Run tests:
cargo test
MIT License
This application is not affiliated with, endorsed by, or connected to X.com. Use it at your own risk. Respect the terms of service of X.com when using this application.