diff --git a/pad_scrapper.sh b/pad_scrapper.sh index c05b1e1..53571d1 100755 --- a/pad_scrapper.sh +++ b/pad_scrapper.sh @@ -5,7 +5,7 @@ password=$(< password-admin.txt) token=$(curl "https://pads.erg.be/oidc/token" -X POST -H 'content-type: application/x-www-form-urlencoded' --data grant_type=client_credentials --data client_id="$login" --data client_secret="$password" -s | jq .access_token -r) -listAllPads_array=($(curl "https://pads.erg.be/api/1.2.1/listAllPads" -H "Authorization: Bearer $token" | jq '.data.padIDs | @sh' -r | tr -d \')) +listAllPads_array=($(curl -s "https://pads.erg.be/api/1.2.1/listAllPads" -H "Authorization: Bearer $token" | jq '.data.padIDs[]' -r)) numberOfPads=${#listAllPads_array[@]} i=1