playola: exploiting AI to get playlists from elitist music articles
this, THE 40 BEST ALBUMS FROM THE LAST 40 YEARS THAT YOU PROBABLY DIDN’T HEAR (BUT SHOULD’VE) - SPIN, article from SPIN was kind of a personal breaking point for me. it starts off strong then totally shits the bed on execution. classic SPIN.
here was an article that was expounding the ease of access to an apparent treasure trove of great albums that streaming was supposed to avail to me. but the fuckers at SPIN couldn’t do us the collective solid of providing a playlist for the popular streaming services that are out there so we could appreciate their critical genius.
this was a better than average listicle and i was genuinely interested in more than a handful of these albums. one would think that in the era of the music listicle, AI serving up a veritable slop-o-rama of garbage music and wanderlusty readers, the music critic gods would have struck a deal with one or more of the streaming services and just embedded our service of choice into the article.
allow me to channel my inner axl …
pick the appropriate verse from: get in the ring.
which brings me to … playola which mashes up a bit of AI for article scraping to assemble artists and albums, feeds these into the apple music search tool and then spits out a tracklist. since i’m in the apple freakosystem, i’ve gone the next step and wired this up to automatically import the extracted playlist into my music app. that is a rant unto itself. see below for a little more info.
that said, i’ve turned this little abomination against all sorts of music articles lately and i’ve been able to listen to a bunch of music i might otherwise have missed out on.
playola
the mechanics are boring in, hopefully, the best way. you hand it the url of some music article and claude reads the thing and pulls out the artist/album list. from there each album gets resolved to its actual tracks against the free iTunes search API - no apple developer account, no dev portal poop-jumping. what falls out the other end is a CSV and an M3U8 playlist stuffed with apple music track URLs. anything it can’t confidently match gets flagged so you can add it by hand rather than have it silently dropped on the floor.
if you’ve sold your soul to apple like i have, you can go a step further. with an apple developer account it’ll use
MusicKit to build the playlist directly in your music library and skip the import dance entirely. the service layer is
pluggable too, so if you’re on some other streaming service you can subclass MusicService, teach it how to resolve
albums, and wire in whatever you’re using. install it with uv tool install playola or pipx, set your
ANTHROPIC_API_KEY, and point it at the next listicle that pisses you off.