icenews Useful
This script gets the latest 20:00 news video from the tagesschau.
The video is getting piped to mpv.
You may need something like yt-dlp or yt-downloader
https://github.com/yt-dlp/yt-dlp
wget https://git.christianimmanuel.de/scripts/raw/Useful/icenews && chmod 740 icenewsicenews raw
#!/bin/bash
##################################################
### This script gets the latest 20:00 news video from the tagesschau.
### The video is getting piped to mpv.
### You may need something like yt-dlp or yt-downloader
### https://github.com/yt-dlp/yt-dlp
case "$1" in
tag)
#LINK="https://$(curl https://www.tagesschau.de/sendung/tagesschau | grep "mp4" | sed 's/^.*\(download.*\)/\1/g' | sed 's/mp4.*/mp4/' | head -n1)"
#LINK="$(curl https://www.tagesschau.de/multimedia | grep "\<div\>" | grep "tagesschau 20:00 Uhr" | sed "s/"/\n/g" | grep mp4 | grep "https" | head -n1)"
LINK="$(curl https://www.tagesschau.de/multimedia/sendung/tagesschau_20_uhr | sed "s/"/\n/g" | grep .mp4 | head -n1)"
;;
mag)
LINK="https://www.zdf.de$(curl https://www.zdf.de/comedy/zdf-magazin-royale | grep 'href="/comedy/zdf-magazin-royale/zdf-magazin-royale-' | sed 's/.html#.*/.html/g;s/.*href=\"//g')"
;;
heu)
LINK="https://www.zdf.de$(curl https://www.zdf.de/comedy/heute-show | grep 'href="/comedy/heute-show/heute-show-vom-' | sed 's/.html#.*/.html/g;s/.*href=\"//g;s/"$//g' | head -n1)"
esac
echo "$LINK"
if which umpv >/dev/null 2>&1; then
script -c "~/bin/umpv $LINK" /dev/null >/dev/null 2>&1 & disown
else
script -c "~/bin/mpv $LINK" /dev/null >/dev/null 2>&1 & disown
fi