Twitter Sref Scraper is a browser-based tool designed to collect Midjourney style references (srefs) from Twitter/X. It's particularly useful for artists, designers, and AI enthusiasts who want to catalog and analyze style references used in Midjourney prompts.
This script:
- Adds a user interface to your Twitter feed for controlling the scraping process.
- Automatically extracts sref codes, associated descriptions, and image URLs from tweets.
- Handles both single srefs and weighted blends (e.g., "--sref 123456" and "--sref 123456:3 789012").
- Saves the collected data in a CSV format for easy analysis and use in other tools.
- Open Twitter and navigate to a search or feed containing Midjourney sref posts.
- Open your browser's developer tools (usually F12 or Ctrl+Shift+I).
- Copy the entire script and paste it into the console.
- Press Enter to run the script.
- A small UI will appear in the top-right corner of your Twitter page.
- Click "Start Recording" to begin collecting srefs as you scroll through tweets.
- Click "Stop & Save" to download the collected data as a CSV file.
This script runs directly in your browser and doesn't require installation. However, you'll need:
- A modern web browser (Chrome, Firefox, or Safari recommended)
- Access to the browser's developer console
Dependencies:
- No external libraries are required. The script uses vanilla JavaScript and runs in the browser environment.
- Username field does not get scraped correctly (gets display name instead).
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions, issues, and feature requests are welcome! Feel free to check issues page if you want to contribute.
This tool is for educational and research purposes only. Be sure to comply with Twitter's terms of service and respect copyright and privacy when using collected data.