https://github.com/icann/uniaccept-python will do a much better job of keeping us updated with gTLDs.