Recently, I have written a script for checking when a set of domains has expired.
At the very beginning, in the variable 'targets' we define domain names.
If script won't able to check when a specific domain will expire, then it will tell to us which domain failed - this can be due to many reasons, for instance because of too many tries or specific domain can be restricted to not show this information.
The script at the end creates and saves raport to file, similar to the one in the picture below.
Example of report
Github Automatic Whois in Python