Report abuse

1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash
# Grab the HQ mp4 video from an rtl.lu page.
# Caution: there is no obvious link between the playlist URL and the video name
# Examples:
# ./rtl http://tele.rtl.lu/magazin/topsecret/show/?v=5325 -> will save 1244626_hq.mp4
# ./rtl http://tele.rtl.lu/waatleeft/replay/v/20120103/0/53601/ -> will save 2191859_hq.mp4
#

playlist="$1"
useragent="iPad; moien; c3l.lu"
url=$(curl -s -A "$useragent" $playlist | grep -o -P '(?<=<video src=\").*?(?=\")' | sed s/wifi/hq/ )
echo "Downloading $url"
curl -O $url