Skip to content

Instantly share code, notes, and snippets.

@pommi
Last active December 26, 2021 20:01
Show Gist options
  • Save pommi/9d4a313d55a7fe406adc8afc1403592a to your computer and use it in GitHub Desktop.
Save pommi/9d4a313d55a7fe406adc8afc1403592a to your computer and use it in GitHub Desktop.
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)
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