Postmodern Sysadmin

A blog about servers and junk

Stream of Conciousness Youtube Videos on Linux

While sitting watching TV I yearned for a more stream-of-consciousness experience. Youtube was the answer.

However, Youtube requires too much interaction. I wanted to vege out and let it just feed me the stream of random images and sound. Selecting purely random youtube videos sounded like a bad idea though…

I decided to do a twitter search for anything with a youtube link, and then let a script just enqueue them into totem, ad-infinitum. Here is my abomination:

while [ 1 ]; 
 for EACHVIDEO in `wget -O - -q "" | grep | grep "<content" | sed 's/quot;/\n/g' | grep "" | cut -f 1 -d "&" `
 totem --enqueue `youtube-dl -g -b "$EACHVIDEO" ` &
 sleep  2s
 sleep 30s

You need a recent version of the youtube-dl script, located here. Put it in your path as appropriate. Press N for next! Next! Next!