That script is a good option, dooglus is one of the best coders on this community, but if you get the address you will have to verify their balance one by one, that's why the best option is to import those privatekeys on a bitcoin wallet, if you use bitcoin core the command to import a key is the next one:
importprivkey yourPrivateKeyInWalletImportFormat
You can use a bash script to import multiple keys, first of all put all those keys on a text file and then you can run something like:
for a in $(cat keys.txt)
do
bitcoin-cli importprivkey $a
done