limbusart/utils/safebooru-download.sh
2024-06-11 02:51:07 +03:00

12 lines
392 B
Bash
Executable File

#!/usr/bin/env bash
touch all.json
for i in $(seq 0 $1); do
curl "https://safebooru.org/index.php?page=dapi&s=post&q=index&tags=project_moon&limit=100&pid=$i&json=1" > temp.json
jq -sr '. | add' temp.json all.json > all.json.temp
mv all.json.temp all.json
rm temp.json
done
jq -r '.[].id | tostring | "https://safebooru.org/index.php?page=post&s=view&id=" + .' all.json > links.txt