16 lines
339 B
Bash
Executable File
16 lines
339 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
TERM="$1"
|
|
ENCTERM="$(echo -n "$TERM" | xxd -p)"
|
|
|
|
TOKEN="581a26491893263804e888240fad1cf7"
|
|
|
|
PAGES="$(./get.sh tag "$TERM" "1" "$TOKEN" | jq .total_pages)"
|
|
|
|
echo $ENCTERM $PAGES >&2
|
|
|
|
for PAGE in $(seq 1 $PAGES); do
|
|
echo "tag: $TERM.$PAGE";
|
|
./get.sh tag "$TERM" "$PAGE" "$TOKEN" > "data/tag-$ENCTERM.$PAGE.json"
|
|
done
|