Skip to content

Instantly share code, notes, and snippets.



Last active Sep 12, 2019
What would you like to do?
Download shows from OE1 Radio
# Downloads shows from OE1
# Usage:
# ./
# URL:
parseJsonValue() {
awk -F"[,:}]" '{for(i=1;i<=NF;i++){if($i~/'$KEY'\042/){print $(i+1)}}}' | tr -d '"' | sed -n 1p
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:59.0) Gecko/20100101 Firefox/59.0"
JSONDATA=`curl -s -X GET${CHANNEL}/api/json/current/broadcast/${ID}/${DATE}`
LOOPSTREAMID=`echo "${JSONDATA}" | parseJsonValue loopStreamId`
TITLE=`echo "${JSONDATA}" | parseJsonValue title | sed 's/[^a-zA-Z 0-9-]//g'`
PROGRAM=`echo "${JSONDATA}" | parseJsonValue programTitle | sed 's/[^a-zA-Z 0-9-]//g'`
printf "CHANNEL:\t%s\nTITLE:\t\t%s\nPROGRAM:\t%s\nURL:\t\t%s\nJSON:\t%s\n" \

This comment has been minimized.

Copy link

@zkzkzk2015 zkzkzk2015 commented Mar 31, 2019

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


This comment has been minimized.

Copy link
Owner Author

@decke decke commented Sep 12, 2019

Danke, ist repariert!

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