Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
svt-serier
#!/bin/bash
cd "$(dirname "$0")" # Script path
mkdir -p SvtPlay && cd SvtPlay
WeekDay=$(date +'%A')
Hour=$(date +'%H')
function dl {
name=$1
if [[ "$WeekDay" != "$2" ]] || (( $3 != 10#$Hour )); then
return;
fi
base="https://www.svtplay.se"
episodeLink=$(wget -q "$base/$name/rss.xml" -O - | grep -m 1 -Po '(?<=link>).*?video.*?[^<]+')
svtplay-dl $episodeLink
}
dl poldark Saturday 21
dl follow-the-money Monday 21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.