Skip to content

Instantly share code, notes, and snippets.

@polyfloyd
Last active April 11, 2018 10:42
Show Gist options
  • Select an option

  • Save polyfloyd/8066e6c55c5cbd85126aabf0eb120bcc to your computer and use it in GitHub Desktop.

Select an option

Save polyfloyd/8066e6c55c5cbd85126aabf0eb120bcc to your computer and use it in GitHub Desktop.
Simple script to listen to Digitaly Imported channels
#!/bin/bash
# Simple script to listen to Digitaly Imported channels without needing the
# abortion of a piece of software that is Flash.
if [ -e $1 ]; then
echo "Usage: $0 <channel>"
echo
echo "Available channels:"
curl "http://pub7.di.fm/" -s \
| grep -o --color=never 'Mount Point /di_\(\w\+\)_aac' \
| cut -d_ -f2 \
| sort -u \
| sed 's/^/\t/'
exit
fi
# I'm using mplayer here, anything that can accept a pipe from curl will work
# fine.
mplayer --http-header-fields=\
"User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:46.0) Gecko/20100101 Firefox/46.0",\
"Referer: http://www.di.fm/" \
"http://pub7.di.fm/di_$1_aac"
@jimdi
Copy link

jimdi commented Apr 11, 2018

not work anymore =(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment