From 48d03c9234e29ecb736f5852913690f06c503241 Mon Sep 17 00:00:00 2001 From: Bilbo Baggins Date: Mon, 10 Jun 2024 22:13:09 +0200 Subject: [PATCH] Initial Commit --- README.md | 4 ++++ mediathekviewweb_cli_script.sh | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100755 mediathekviewweb_cli_script.sh diff --git a/README.md b/README.md index de57963..39c6ae9 100644 --- a/README.md +++ b/README.md @@ -17,3 +17,7 @@ ha-shell.sh: ssh to haos and open shell on home-assistant docker contain wmbus-shell.sh: ssh to haos and open shell on wmbus docker container wmbus-logs.sh: ssh to haos and retrieve logs from wmbus docker container + +mediathekviewweb_cli_script.sh + bash script that uses mediathekviewweb_cli (python) and jq to download an entire TV series + (instructions/description in comments) diff --git a/mediathekviewweb_cli_script.sh b/mediathekviewweb_cli_script.sh new file mode 100755 index 0000000..a32ecd4 --- /dev/null +++ b/mediathekviewweb_cli_script.sh @@ -0,0 +1,34 @@ +#!/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