2023-07-28 09:47:33 +00:00
|
|
|
#!/usr/bin/env bash
|
2023-07-28 10:35:31 +00:00
|
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
# SPDX-FileCopyrightText: 2023 Hugo Peixoto <hugo.peixoto@gmail.com>
|
2023-07-28 09:47:33 +00:00
|
|
|
|
|
|
|
TERM="$1"
|
|
|
|
ENCTERM="$(echo -n "$TERM" | xxd -p)"
|
|
|
|
|
|
|
|
TOKEN="581a26491893263804e888240fad1cf7"
|
|
|
|
|
|
|
|
PAGES="$(./get.sh username "$TERM" "1" "$TOKEN" | jq .total_pages)"
|
|
|
|
|
|
|
|
echo $ENCTERM $PAGES >&2
|
|
|
|
|
|
|
|
for PAGE in $(seq 1 $PAGES); do
|
|
|
|
echo "username: $TERM.$PAGE" >&2
|
|
|
|
./get.sh username "$TERM" "$PAGE" "$TOKEN" > "data/username.$ENCTERM.$PAGE.json"
|
|
|
|
done
|