Created
October 6, 2019 01:12
-
-
Save jdingel/ad95d870889dd039d836e0395e4fe4ca to your computer and use it in GitHub Desktop.
Download essentialmix.nu tracklistings
This file contains hidden or 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 {100..115} | |
do | |
wget "https://www.essentialmix.nu/?modname=tracklistings&op=view&id=${i}" -O - | | |
grep -A 4 'Essential Mix</a> Archives' | tail -3 | sed 's/^.*\<b\>\([A-Za-z\ ].*\)\<\/b\> Broadcasted/\1/' | pandoc -f html -t plain | sed 's/\[\]//' | sed 's/^[[:space:]]*//' | sed 's/\-\-\-\-//g' | grep -v '^$' > temp.txt | |
filename=$(head -1 temp.txt | sed 's/on [SMTWF][a-z]*day/\-/' | | |
sed 's/\([0-9]*\)[rsth][dsth] \([JFMASOND][a-z]*\), \([12][90][901][0-9]\)/\3\.\2\.\1/' | | |
sed 's/January/01/' | sed 's/February/02/' | sed 's/March/03/' | sed 's/April/04/' | sed 's/May/05/' | sed 's/June/06/' | sed 's/July/07/' | sed 's/August/08/' | sed 's/September/09/' | sed 's/October/10/' | sed 's/November/11/' | sed 's/December/12/') | |
mv temp.txt "${filename}.txt" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment