This repository contains the code to create a YouTube playlist containing the most popular video of each of the artists of the Lollapalooza 2017 lineup.
I made this because I feel old and disconnected from today's youth what with their loud music and what not. Also, I'm lazy and sure as hell wasn't going to manually search for every band's popular song on YouTube.
If you're lazier than I am, just go to the Lollapalooza 2017 playlist that I made.
First I created a CSV file of the lineup from the Wikipedia page because one didn't exist.
Then I spent a lot of time in the Google Developers Console, registering an app, setting a callback of http://localhost:8080/
, and downloading the client_secrets.json
file.
Next I stumbled around in the YouTube Data API documentation in a haze until I figured out I had to install the Google API Client Library for Python along with some decent Python sample code on GitHub. After that it was simply a matter of creating a new playlist, searching for the videos of each artist, and then adding the video to the playlist.
Remember to register an app in the Google Developers Console as mentioned above.
$ mkvirtualenv lollaplaylist
(lollaplaylist)$ git clone git@github.com:richardcornish/lollaplaylist.git
(lollaplaylist)$ cd lollaplaylist/
(lollaplaylist)$ pip install -r requirements.txt
(lollaplaylist)$ cd lollaplaylist/
(lollaplaylist)$ python youtube