Skip to content

Instantly share code, notes, and snippets.

@Korni22
Last active January 28, 2017 12:54
Show Gist options
  • Save Korni22/56a8738521a57d17724f8ce6510e70b0 to your computer and use it in GitHub Desktop.
Save Korni22/56a8738521a57d17724f8ce6510e70b0 to your computer and use it in GitHub Desktop.
#!/bin/bash
URL=http://www.zdf.de/rss/podcast/video/zdf/comedy/neo-magazin-mit-jan-boehmermann
REGEX='/<link>[^<]+neo-magazin-royale-mit-jan-boehmermann-vom[^<]+/'
OFFSET=6
curl -fsSL $URL \
| awk "match(\$0, $REGEX) { print substr(\$0, RSTART+$OFFSET, RLENGTH-$OFFSET); }" \
| xargs -n1 youtube-dl -c -o "%(title)s.%(ext)s"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment