limbusart/utils/safebooru-download.sh

12 lines
392 B
Bash
Raw Normal View History

2023-07-17 13:58:47 +03:00
#!/usr/bin/env bash
touch all.json
2024-06-11 02:51:07 +03:00
for i in $(seq 0 $1); do
2023-07-17 13:58:47 +03:00
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
2024-06-11 02:51:07 +03:00
done
jq -r '.[].id | tostring | "https://safebooru.org/index.php?page=post&s=view&id=" + .' all.json > links.txt