feat: update scripts
This commit is contained in:
parent
8b1ba19279
commit
fc73c0aeee
11746
utils/arts.txt
Normal file
11746
utils/arts.txt
Normal file
File diff suppressed because it is too large
Load Diff
11
utils/filter-dead-twitter-links.sh
Executable file
11
utils/filter-dead-twitter-links.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
touch filtered_arts.txt
|
||||||
|
while IFS= read -r line
|
||||||
|
do
|
||||||
|
header=$(curl -o save -w "%{header_json}" "$line" 2> /dev/null)
|
||||||
|
echo $header | jq -e '.location[]' >/dev/null
|
||||||
|
if [ "$?" = "0" ]; then
|
||||||
|
echo "$line" >> filtered_arts.txt
|
||||||
|
fi
|
||||||
|
done < $1
|
@ -1,9 +1,11 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
touch all.json
|
touch all.json
|
||||||
for i in $(seq 0 38); do
|
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
|
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
|
jq -sr '. | add' temp.json all.json > all.json.temp
|
||||||
mv all.json.temp all.json
|
mv all.json.temp all.json
|
||||||
rm temp.json
|
rm temp.json
|
||||||
done
|
done
|
||||||
|
|
||||||
|
jq -r '.[].id | tostring | "https://safebooru.org/index.php?page=post&s=view&id=" + .' all.json > links.txt
|
||||||
|
Loading…
Reference in New Issue
Block a user