Skip to content

Instantly share code, notes, and snippets.

@fiskr
fiskr / download-radiolab.sh
Created February 1, 2017 21:50
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
@fiskr
fiskr / download-HowWeRoll.sh
Created December 2, 2017 18:06
In one line, download all How We Roll podcast episodes from their RSS feed.
#!/bin/bash
curl https://rss.simplecast.com/podcasts/3236/rss | grep mp3 | perl -pe 's/.*?url="([^"]+)".*/$1/g' | xargs wget --content-disposition
@fiskr
fiskr / expanded_download-HowWeRoll.sh
Created December 2, 2017 18:09
Download How We Roll episodes from RSS feed with better titles.
#!/bin/bash
# Related one-line script: https://gist.github.com/fiskr/b0c01bbcbd2aefaa726d46bea30a3307
dataFile="urls.dat"
rssUrl="https://rss.simplecast.com/podcasts/3236/rss" # How We Roll podcast
# Download the RSS feed for episodes of the How We Roll Podcast
# then, retrieve from the HTML just the episode titles and URLs
# then, exclude subtitles, since we don't need those
# then, parse the URL from the attribute of the node
# then, delete all node tags, e.g. <title>