Skip to content

Instantly share code, notes, and snippets.

@pbausch
Last active November 2, 2016 19:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pbausch/ffd346e6eb00b98edc9855717abd548a to your computer and use it in GitHub Desktop.
Save pbausch/ffd346e6eb00b98edc9855717abd548a to your computer and use it in GitHub Desktop.
Find the podcast RSS URL from an iTunes podcast URL
#!/bin/bash
# Not sure where I found this one, but thanks!
URL=$(curl -s -A "iTunes/9.1.1" --compressed $1 |
grep -o 'https[^<]*' |
perl -n -mHTML::Entities -e ' ; print HTML::Entities::decode_entities($_) ;')
curl -s -A "iTunes/9.1.1" --compressed $URL |
grep -o 'feed-url="[^"]*' |
sed -e 's/feed-url="//'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment