-
-
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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