init
This commit is contained in:
12
get_data/get-events.sh
Executable file
12
get_data/get-events.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
args=("$@")
|
||||
|
||||
curl -s -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36" https://olympics.com/en/olympic-games/tokyo-2020/results/${args[0]} |\
|
||||
sed -E 's->->\n-g' |\
|
||||
rg -A 9999999999999999 '<script id="__NEXT_DATA__" type="application/json">' |\
|
||||
sed -n 2p |\
|
||||
rev |\
|
||||
cut -c10- |\
|
||||
rev |\
|
||||
jq '[.["props"]["pageProps"]["allEvents"][]["slug"]]'
|
||||
Reference in New Issue
Block a user