From 12c4af1846d814a6bd699bcbb4b6ec1459a1f7bd Mon Sep 17 00:00:00 2001 From: Valentin Gehrke Date: Tue, 6 Oct 2015 04:43:16 +0200 Subject: [PATCH] =?UTF-8?q?URL=20wird=20=C3=BCberpr=C3=BCft?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tg.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tg.sh b/tg.sh index a63d63a..af6cfd7 100755 --- a/tg.sh +++ b/tg.sh @@ -1,3 +1,9 @@ #!/bin/bash -mpv $(wget -O- -q http://www.tagesschau.de/100sekunden/ | grep -Eo 'http:\/\/download.media.tagesschau.de\/video\/[^"]+\.webl\.webm') +url=$(wget -O- -q http://www.tagesschau.de/100sekunden/ | grep -Eo 'http:\/\/download.media.tagesschau.de\/video\/[^"]+\.webl\.webm') +if [ -z "$url" ]; then + echo "No file found" + exit 1 +fi + +mpv -fs $url