What Python way would you suggest to check whois database records?

前端 未结 9 979
忘掉有多难
忘掉有多难 2020-12-31 18:20

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:

9条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2020-12-31 18:40

    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.

提交回复
热议问题