Last active
December 26, 2021 20:01
-
-
Save pommi/9d4a313d55a7fe406adc8afc1403592a to your computer and use it in GitHub Desktop.
Download the NPO Radio 2 Top 2000 2018
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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) | |
tail -n +5 mp3 | sponge mp3 | |
for m in $(cat mp3); do | |
curl -OL $m | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment