Code Monkey home page Code Monkey logo

Comments (5)

maarten-boot avatar maarten-boot commented on June 20, 2024

you have a example whois cli lookup

from python-whois.

maarten-boot avatar maarten-boot commented on June 20, 2024

there are a few issues when dates are not available, if we add the flags as bool then it is best not to have the flag if we cannot determine the status of available, expired, pendingDelete

in general if a expire exists and is > now() available is False

if we have a expired date we can have the expired: True if expiredDate < Now()

pending delete is more difficult to define

from python-whois.

baigreen avatar baigreen commented on June 20, 2024

Thanks for you suggestion.

from python-whois.

maarten-boot avatar maarten-boot commented on June 20, 2024

as a example i added in my code a test that if we have a expire date we can check hasExpired
and if it has not expired then it is certainly not available
the defaults would be None for both hasExpired and isAvailable

name               str               'meta.com'
tld                str               'com'
registrar          str               'RegistrarSafe, LLC'
registrant_country str               'US'
creation_date      datetime.datetime 1991-01-21 05:00:00
expiration_date    NoneType          None
last_updated       datetime.datetime 2023-01-25 20:09:06
hasExpired         NoneType          None
isAvalable         NoneType          None
status             str               'clientDeleteProhibited https://www.icann.org/epp#clientDeleteProhibited'
statuses           list              ['clientDeleteProhibited https://www.icann.org/epp#clientDeleteProhibited', 'clientTransferProhibited https://www.icann.org/epp#clientTransferProhibited', 'clientUpdateProhibited https://www.icann.org/epp#clientUpdateProhibited', 'serverDeleteProhibited https://www.icann.org/epp#serverDeleteProhibited', 'serverTransferProhibited https://www.icann.org/epp#serverTransferProhibited', 'serverUpdateProhibited https://www.icann.org/epp#serverUpdateProhibited']
dnssec             bool              False
name_servers       list              ['a.ns.facebook.com', 'b.ns.facebook.com', 'c.ns.facebook.com', 'd.ns.facebook.com']
registrant         str               'Meta Platforms, Inc.'
emails             list              ['[email protected]', '[email protected]']
test domain: <<<<<<<<<< google.fr >>>>>>>>>>>>>>>>>>>>
name               str               'google.fr'
tld                str               'fr'
registrar          str               'MARKMONITOR Inc.'
registrant_country str               ''
creation_date      datetime.datetime 2000-07-26 22:00:00
expiration_date    datetime.datetime 2023-12-30 17:16:48
last_updated       datetime.datetime 2022-12-03 09:40:42.406240
hasExpired         bool              False
isAvailable        bool              False
status             str               'ACTIVE'
statuses           list              ['ACTIVE', 'active', 'associated', 'not identified', 'ok', 'serverDeleteProhibited', 'serverRecoverProhibited', 'serverTransferProhibited', 'serverUpdateProhibited']
dnssec             bool              False
name_servers       list              ['ns1.google.com', 'ns2.google.com', 'ns3.google.com', 'ns4.google.com']
registrant         str               'Google Ireland Holdings Unlimited Company'
emails             list              ['[email protected]', '[email protected]', '[email protected]'```

from python-whois.

baigreen avatar baigreen commented on June 20, 2024

That is a great job.

from python-whois.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.