Skip to content

Instantly share code, notes, and snippets.

@fiskr
Created February 1, 2017 21:50
Show Gist options
  • Save fiskr/53f460044bc6b249e89c2c76f1dbae3a to your computer and use it in GitHub Desktop.
Save fiskr/53f460044bc6b249e89c2c76f1dbae3a to your computer and use it in GitHub Desktop.
Download all Radiolab episodes
#!/bin/bash
# OSX, GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin15)
for URL in $(curl -sL http://www.radiolab.org/archive/ | grep -i read-more | perl -pe 's/^.*?"(http.*?)".*$/$1/g' | sort -u); do curl -sL $URL | grep -i download | head -n 1 | perl -pe 's/^.*?download="(http.*?)".*$/$1/g' | xargs wget; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment