Skip to content

Instantly share code, notes, and snippets.

@cirrusUK
Last active April 27, 2024 06:23
Show Gist options
  • Select an option

  • Save cirrusUK/3aa68eb0d26cf88a81bc70bfd1787df7 to your computer and use it in GitHub Desktop.

Select an option

Save cirrusUK/3aa68eb0d26cf88a81bc70bfd1787df7 to your computer and use it in GitHub Desktop.
wrapper for watching sports with acestream/arenavision | usage: ./acer <insert number shown at end of desired stream>
#!/usr/bin/zsh
readonly TMP="$(mktemp /tmp/areavision.XXXXXX)"
curl --location-trusted -k --silent "http://arenavision.in/schedule" --output "${TMP}"
function schedule() {
awk -v RS='</tr>' -v F='<td>' '{gsub(/<[^<>]*>/,"");print $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14}' "${TMP}"
}
function play() {
/usr/local/bin/ace.sh "$(xmllint http://arenavision.in/av"$1" --html --xpath "string(//p[@class='auto-style1']/a/@href)" 2> /dev/null)"
}
case "$1" in
''|*[!0-9]*) schedule ;;
*) play "$1";;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment