mirror of
https://github.com/raynormast/fake-firehose.git
synced 2024-12-24 00:38:27 +00:00
24 lines
517 B
Bash
Executable file
24 lines
517 B
Bash
Executable file
host=$1
|
|
while true
|
|
do
|
|
today=`date +"%Y%m%d"`
|
|
curl -X "GET" "https://$host/api/v1/streaming/public" \
|
|
--no-progress-meter | \
|
|
tee -a "$today.json" | \
|
|
grep url | \
|
|
sed 's/data://g' | \
|
|
|
|
while read -r line
|
|
do
|
|
|
|
if [[ $line == *"uri"* ]]
|
|
then
|
|
url=`echo $line | jq .url| sed 's/\"//g'`
|
|
uri=`echo $line | jq .uri| sed 's/\"//g'`
|
|
|
|
echo "$host $url"
|
|
echo $uri >> "$today.uris.txt"
|
|
|
|
fi
|
|
done
|
|
done
|