summaryrefslogtreecommitdiff
path: root/lf/lfs
blob: 112e994787889c8a8ec61fd95a0f237e35d299c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

# Get similar songs from Last.fm

usage() { echo usage: $0 base-url 1>&2; exit 1; }

url=$1

# Retrieve similar songs
curl -s "$url" |
sed '/^[ 	]*$/d' |
awk -F \" '
	/class="track-similar-tracks-item-name"/ {
		getline;
		getline;
		print $2;
	}
' |
sed 's,^,https://www.last.fm,'