(02-23-2024, 06:43 PM)jmguillaume Wrote: The script to retrieve the data is 12 lines :-) Spotipy is doing all the job.
That is what I meant... how big and/or heavi is Spotipy
My approach is also about 3 seconds, goes to open.spotify.com as if it were a browser (requests a total of 3 pages)
track (https://open.spotify.com/track/<track_id>) -- extracts track title, index, duration, album_id, artist_id
album (https://open.spotify.com/album/<album_id>) -- extracts album title, coverart url
artist (https://open.spotify.com/artist/<artist_id>) -- extracts artist name
but does not require any account, as it just filters the header block of the html and extracts the information from its <meta> tags.
Find the attached script, it needs to be invoked with the track_id as parameter. You can also compare times.