A script to download profile public images from a Playground.
- Download Python from python.org
- During installation, check "Add Python to PATH"
- Verify installation by opening a terminal/command prompt and running:
python --version pip --version
Open a terminal/command prompt and run:
pip install requests
Place the script in the folder where you want to save the images, and then open the folder in the terminal.
The script downloads data in json format, which contains available information about the images: prompt, name, dimensions, likes, generation settings, and more.
By default, the script saves both formats (png and jpeg), but you can specify only one, see the instructions below.
By default, the script saves images under the names specified in json and on the site, this will allow you to find image data by its name.
But the images in the folder will be unordered.
But if you use the --name-by-date
option, this will add the time of its creation at the start of the image name, which will allow you to organize them.
Run:
python image-fetcher.py [USER_ID]
Replace [USER_ID]
with the target user's ID or profile URL.
Option | Description | Example |
---|---|---|
USER_ID |
Required. User ID or full profile URL | python image-fetcher.py cldm1234abcd |
--output |
Custom output directory | python image-fetcher.py cldm1234abcd --output my_images |
--only-png |
Download only PNG images | python image-fetcher.py cldm1234abcd --only-png |
--only-jpeg |
Download only JPEG images | python image-fetcher.py cldm1234abcd --only-jpeg |
--name-by-date |
Rename files to creation date | python image-fetcher.py cldm1234abcd --name-by-date |
-
Download all images for a user:
python image-fetcher.py cldm1234abcdefjhig
-
Download only PNG images to a specific directory:
python image-fetcher.py cldm1234abcdefjhig --output ./playground_images --only-png
-
Download images with date-based filenames:
python image-fetcher.py cldm1234abcdefjhig --name-by-date
downloaded_data/
: Default output directorypng/
: PNG imagesjpeg/
: JPEG images- JSON files with image metadata
- Ensure you have a stable internet connection
- Check that the user ID or profile URL is correct
- Verify you have write permissions in the output directory
- Check if you have enough harddisk space(up to 1.5 Gigabytes per 1000 images)
- Script downloads only public images
- Large collections may take some time to download(up to several hours)