Instruction how to get information from MusicBrainz database. Script above shows how to get basic information about entered artist. Script returns list of albums with release date, title, and url to front and back cover (if exits) Tutorial for MusicBrain is https://musicbrainz.org/doc/Development/XML_Web_Service/Version_2%|%here%|% First of all we need to check artist id ====== http://www.musicbrainz.org/ws/2/artist/?query= ====== Next we can get xml contains release-list using following link: ====== http://www.musicbrainz.org/ws/2/release?artist= ====== According to the http://wiki.musicbrainz.org/%|%wiki.musicbrainz.org%|%: cover arts are available via http://coverartarchive.org%|%coverartarchive.org%|% ====== http://coverartarchive.org ====== Let's try to get some basic info: ====== package require http package require tdom proc ___returnArtistID {artist} { set r [::http::geturl http://www.musicbrainz.org/ws/2/artist/?query=$artist] set data [::http::data $r] ::http::cleanup $r set doc [dom parse $data] set root [$doc documentElement] set ns {xmlns http://musicbrainz.org/ns/mmd-2.0#} set nodesList [$root selectNodes -namespaces $ns //xmlns:artist-list//xmlns:artist] return [[lindex $nodesList 0] getAttribute id] } proc ___coverURL {type id} { return "http://coverartarchive.org/release/$id/$type" } proc ___returnReleases {artistID} { set r [::http::geturl http://www.musicbrainz.org/ws/2/release?artist=$artistID] set data [::http::data $r] ::http::cleanup $r set doc [dom parse $data] set root [$doc documentElement] set ns {xmlns http://musicbrainz.org/ns/mmd-2.0#} set nodesList [$root selectNodes -namespaces $ns //xmlns:release-list//xmlns:release] #id used in the second query foreach node $nodesList { set date "" set id [$node getAttribute id] lappend ids $id set titleNode [$node selectNodes -namespaces $ns //xmlns:release-list//xmlns:release\[@id='$id'\]//xmlns:title] set dateNodes [$node selectNodes -namespaces $ns //xmlns:release-list//xmlns:release\[@id='$id'\]//xmlns:date] set coverFrontNode [$node selectNodes -namespaces $ns //xmlns:release-list//xmlns:release\[@id='$id'\]//xmlns:cover-art-archive//xmlns:front] set coverBackNode [$node selectNodes -namespaces $ns //xmlns:release-list//xmlns:release\[@id='$id'\]//xmlns:cover-art-archive//xmlns:back] set frontC [expr {[$coverFrontNode text] eq "true" ? [___coverURL "front" $id] : "false" }] set backC [expr {[$coverFrontNode text] eq "true" ? [___coverURL "back" $id] : "false" }] puts "##### Title: [$titleNode text] #####" puts "date: [[lindex $dateNodes 0] text]" puts "cover front: $frontC" puts "cover back: $backC" puts "##### #####" } return $ids } set artistID [___returnArtistID "portishead"] set releaseIDs [___returnReleases $artistID] puts [___returnArtistID "portishead"] ====== <>Music|Internet