Skip to content

Instantly share code, notes, and snippets.

@pommi
pommi / download-top2000-2018.sh
Last active December 26, 2021 20:01
Download the NPO Radio 2 Top 2000 2018
#!/bin/sh
for i in $(seq 25 31); do
curl -s https://www.nporadio2.nl/uitzendinggemist?date=$i-12-2018 | grep '/gemist/uitzending' | cut -d'"' -f 2 | xargs -i echo "https://www.nporadio2.nl{}" | tac >> pages
done
for p in $(cat pages); do
curl -s $p | grep broadcaststream | cut -d '"' -f 2 | xargs -i echo "https:{}" >> mp3
done
# remove the 1st 4 items (00:00-02:00, 02:00-04:00, 04:00-06:00, 06:00-08:00)