I\'m trying to get a webservice up and running that actually requires to check whois databases. What I\'m doing right now is ugly and I\'d like to avoid it as much as I can:
Another way to do it is to use urllib2
module to parse some other page's whois service (many sites like that exist). But that seems like even more of a hack that what you do now, and would give you a dependency on whatever whois site you chose, which is bad.
I hate to say it, but unless you want to re-implement whois
in your program (which would be re-inventing the wheel), running whois
on the OS and parsing the output (ie what you are doing now) seems like the right way to do it.