TM Fetch Album Art
is a Python script that retrieves high-resolution album art for a given artist and album using a Apple's iTunes API.
I tend to create playlists from entire albums but Apple Music doesn't use the album artwork as the playlist artwork. I use this script to grab the image and then manually add it to my playlists.
This script can be used to enhance your music collection with high-quality album covers.
- Fetches high-resolution album art from the iTunes API
- Simple command-line interface
-
Clone the Repository:
git clone https://github.com/tommcfarlin/tm-fetch-album-art.git
-
Navigate to the Project Directory
cd tm-fetch-album-art
-
Create and Activate a Virtual Environment:
For macOS:
python3 -m venv venv source venv/bin/activate
For Windows:
python -m venv venv venv\Scripts\activate
-
Install Dependencies
pip install -r requirements.txt
-
Set Up Environment Variables (for Spotify)
If you plan to use the Spotify service, you need to create a
.env
file in the project root directory with your Spotify API credentials:SPOTIFY_CLIENT_ID=your_spotify_client_id SPOTIFY_CLIENT_SECRET=your_spotify_client_secret
Replace
your_spotify_client_id
andyour_spotify_client_secret
with your actual Spotify API credentials.
Using the script consists of adding the following in your terminal:
python fetch-album-art.py --artist="Artist Name" --album="Album Title" --service="apple"
Replace "Artist Name" and "Album Title" with the desired artist and album names. If you want to use Spotify, then replace "apple" with "spotify" in the --service
parameter.
To fetch album art for "The Dark Side of the Moon" by Pink Floyd:
python fetch-album-art.py --artist="Pink Floyd" --album="The Dark Side of the Moon" --service="apple"
This project is licensed under the MIT License. See the LICENSE file for details.
Thanks to the following APIs: