Skip to content

Instantly share code, notes, and snippets.

@decke decke/
Last active Mar 31, 2019

What would you like to do?
Download shows from OE1 Radio
# Downloads shows from OE1
# Usage:
# ./
# URL:
DATE=`echo $1 | cut -d'/' -f5`
ID=`echo $1 | cut -d'/' -f6`
CHANNEL=`echo $1 | cut -d'/' -f3 | cut -d'.' -f1`
USERAGENT="Mozilla/5.0 (X11; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0"
function jsonValue() {
awk -F"[,:}]" '{for(i=1;i<=NF;i++){if($i~/'$KEY'\042/){print $(i+1)}}}' | tr -d '"' | sed -n ${num}p
LOOPSTREAMID=`curl -s -X GET ${JSONURL} | jsonValue loopStreamId 1`
TITLE=`curl -s -X GET ${JSONURL} | jsonValue title 1 | sed 's/[^a-zA-Z 0-9-]//g'`
PROGRAMTITLE=`curl -s -X GET ${JSONURL} | jsonValue programTitle 1 | sed 's/[^a-zA-Z 0-9-]//g'`
printf "CHANNEL:\t%s\nTITLE:\t%s\nPROGRAM:\t%s\nURL:\t%s\nJSON:\t%s\n" \

This comment has been minimized.

Copy link

commented Mar 31, 2019

Schlüsselwort function mit () in Zeile 17 produziert Fehler. Einfach function löschen und alles funkt bestens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.