From 3a7c644838f74312e827f78a38fe4764e1208086 Mon Sep 17 00:00:00 2001 From: filifa Date: Thu, 1 Aug 2024 20:42:12 -0500 Subject: [PATCH] only save final video (i think) --- mlbhighlightsave.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlbhighlightsave.sh b/mlbhighlightsave.sh index f3608aa..ed47dcc 100755 --- a/mlbhighlightsave.sh +++ b/mlbhighlightsave.sh @@ -40,5 +40,5 @@ fi # grab select data from response with jq, add 0 to the end of each line (to go # in the 'posted' db column), then write each line to db -jqFilter='.highlights.highlights.items | map(select(.keywordsAll[].value == "highlight"))[] | {headline, id} + {url: (.playbacks | map(select(.name == "mp4Avc"))[0].url)}' +jqFilter='.highlights.highlights.items | map(select(.keywordsAll[].value == "highlight"))[] | {headline, id} + {url: (.playbacks | map(select(.name == "mp4Avc"))[0].url)} | select(.url | startswith("https://mlb-cuts-diamond"))' mlblive content -g $gamePk | jq -Sc "$jqFilter" | sed 's/$/0/' | sqlite3 $db '.mode ascii' '.separator  \n' '.import /dev/stdin mlbdata'