bash-scripts/mediathekviewweb_cli_script.sh

35 lines
1.8 KiB
Bash
Raw Normal View History

2024-06-10 22:13:09 +02:00
#!/usr/bin/env bash
#
# Die Zeilen nach "done <<- EOF" sind erstellt worden mit
# mediathekviewweb_cli --topic "northern lights" | jq | grep "title\|url_video_hd" | grep -v subtitle
# Das script gibt nur die Titel und URLs aus, damit man noch eine Kontrolle vor Download hat.
# erst wenn man das Script mit dem Parameter "doit" aufruft, werden die Titel/URL runter geladen.
# von Jan K. mediathekviewweb_cli --topic "northern lights" | jq '.[] | select(.duration > 2800) | { title: .title, url: .url_video_hd }'
# oder auch
# mediathekviewweb_cli --topic "northern lights" | jq '.[] | select(.duration > 2800) | select(.title | contains("Audiodesk") | not) | select(.title | contains("Englisch")| not) | .title, .url_video_hd'
#
while read ititle; read url
do
title=`echo $ititle | tr -d / | tr -d \:`
# url=`echo $iurl | cut -d\" -f4 `
echo $title ; echo $url
if [ "$1" = "doit" ]
then
curl -o "$title".mp4 "$url"
fi
done <<- EOF
"Neuanfänge (S01/E06)"
"https://nrodlzdf-a.akamaihd.net/de/zdf/24/03/240320_0305_sendung_not/1/240320_0305_sendung_not_a1a2_6660k_p37v17.mp4"
"Polarlichter (S01/E05)"
"https://nrodlzdf-a.akamaihd.net/de/zdf/24/03/240320_0215_sendung_not/3/240320_0215_sendung_not_a1a2_6660k_p37v17.mp4"
"Gemeinsam einsam (S01/E04)"
"https://nrodlzdf-a.akamaihd.net/de/zdf/24/03/240320_0130_sendung_not/3/240320_0130_sendung_not_a1a2_6660k_p37v17.mp4"
"Tom Jones (S01/E03)"
"https://nrodlzdf-a.akamaihd.net/de/zdf/24/03/240320_0045_sendung_not/3/240320_0045_sendung_not_a1a2_6660k_p37v17.mp4"
"Der Morgen danach (S01/E02)"
"https://nrodlzdf-a.akamaihd.net/de/zdf/24/03/240320_0000_sendung_not/3/240320_0000_sendung_not_a1a2_6660k_p37v17.mp4"
"Begegnung auf der Brücke (S01/E01)"
"https://nrodlzdf-a.akamaihd.net/de/zdf/24/03/240319_2310_sendung_not/3/240319_2310_sendung_not_a1a2_6660k_p37v17.mp4"
EOF