This API gathering script you have, which requires looking through BP's websites, scraping their BP.json files (if they exist!), and collecting all that information, finding which API nodes exist... is now replaced with a single command.
I've replaced the whole gathering process with a single call to the table, like so:
./cleos -u https://eos.greymass.com get table producerjson producerjson producerjson | jq .rows[].json --raw-output | jq ".nodes[] | select(.ssl_endpoint != null) .ssl_endpoint"
Tada! Output looks like
"https://node0.eosblocksmith.io"
"https://eos.greymass.com"
As right now only 2 BPCs have plugged in their bp info's. But as BP's add their data, this call will always get the latest info.
Now anyone can validate immediately and not require any websites, just the blockchain itself.
RE: An EOS Smart Contract for Block Producer Information