blob: f7023fd2ee15eb237c43cf5ddb6719277bb67a48 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/bin/bash
# Rockantenne-Playlist
# $1 = outfile
### Variabel
Name="Rockantenne [www.rockantenne.de]"
###
# get...
wget -q --tries=2 --timeout=5 -O /tmp/playlist "http://www.rockantenne.de/musik/song-suche"
# last Artist/Title
all=`grep -m1 -A2 '<h2 class="song_title">' /tmp/playlist`
artist=${all//*$'class="artist"'/}; artist=${artist//*$'">'/}; artist=${artist/$'</a>'*/}
title=${all//*$'title="'/}; title=${title/$'">'*/}
# temp. no Info
artist=${artist:='---'}; title=${title:='---'}
# write...
if [ $1 ]; then
echo $Name > $1
echo $artist >> $1
echo $title >> $1
else
echo "$Name: Interpret/Titel = $artist / $title"
fi
|