Una solución imperfecta, pero que devolverá un conjunto de resultados razonablemente precisos. Esto se basa en poder utilizar AppleScript con iTunes y un API para realizar búsquedas en la tienda iTunes Store. El aspecto clave que hace que esta solución sea imperfecta es que los datos que puedo obtener de iTunes (nombres de artistas, etc.) no coinciden necesariamente con lo que la tienda de iTunes tiene en su base de datos.
Este AppleScript requiere la aplicación 'JSON Helper' de la App Store. Es gratis. Lo necesitaba para poder analizar el JSON que recibí de Apple.
set _string to load script alias ((path to desktop as text) & "_string.scpt")
set _url to load script alias ("Macintosh HD:Users:ericgorr:depot:AppleScript:Library:_url.scpt")
set this_file to (((path to desktop folder) as text) & "videos")
tell application "iTunes"
copy (count of tracks in playlist "4+") to trackCount
log trackCount
copy "https://itunes.apple.com/search?entity=musicVideo" to baseURL
repeat with x from 1 to trackCount
copy (artist of track x in playlist "4+") to theArtist
copy (name of track x in playlist "4+") to theSongName
copy (_url's urlEncode(theSongName)) to encodedSongName
copy (baseURL & "&term=" & encodedSongName) to searchURL
my write_to_file(theArtist & return, this_file, true)
tell application "JSON Helper"
set iTunesResults to fetch JSON from searchURL
set resultCount to resultCount of iTunesResults
repeat with y from 1 to resultCount
set aResult to item y of results of iTunesResults
set trackURL to trackViewUrl of aResult
set returnedArtistName to artistName of aResult
set outputLine to tab & returnedArtistName & tab & theSongName & tab & trackURL & return
my write_to_file(outputLine, this_file, true)
end repeat
end tell
end repeat
end tell
on write_to_file(this_data, target_file, append_data) -- (string, file path as string, boolean)
try
set the target_file to the target_file as text
set the open_target_file to ¬
open for access file target_file with write permission
if append_data is false then ¬
set eof of the open_target_file to 0
write this_data to the open_target_file starting at eof
close access the open_target_file
return true
on error
try
close access file target_file
end try
return false
end try
end write_to_file