Last active
November 4, 2017 14:09
-
-
Save assafmo/68e33d67107f99b2730240601da36db2 to your computer and use it in GitHub Desktop.
ESPN NBA scoreboard page to highlights mp4
This file contains 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
#!/bin/bash | |
curl 'http://www.espn.com/nba/scoreboard' --compressed -s | \ | |
grep -Eo '\{"leagues.+}' | \ | |
jq -r '.events | '\ | |
'map(.competitions | '\ | |
'map(.headlines | '\ | |
'map(.video | '\ | |
'map(if .tracking.coverageType == "Final Game Highlight" then '\ | |
'.links.source.HD.href else empty end))))[][][][]' 2> /dev/null |
works great piping: ./espn_nba_scoreboard_to_mp4.sh | xargs -n 1 aria2c -c -s 8 -x 8 -k 1M --stream-piece-selector=inorder
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also work with dates, .e.g replace the URL with
http://www.espn.com/nba/scoreboard/_/date/20161026
.