Code Monkey home page Code Monkey logo

Comments (4)

GoogleCodeExporter avatar GoogleCodeExporter commented on May 25, 2024
Soon .nz will be added.

Original comment by [email protected] on 24 Jun 2012 at 6:49

  • Changed state: Accepted

from python-whois.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 25, 2024
support for. nz added in version 0.6.3

Original comment by [email protected] on 26 Jun 2012 at 11:00

  • Changed state: Fixed

from python-whois.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 25, 2024
Testing the 0.6.3 version, I get this error:

>>> import whois
>>> domain = whois.query('cloud.geek.nz')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/whois/__init__.py", line 51, in query
    return Domain(pd) if pd['domain_name'][0] else None
  File "/usr/lib/python2.7/dist-packages/whois/_3_adjust.py", line 7, in __init__
    self.creation_date      = str_to_date(data['creation_date'][0])
  File "/usr/lib/python2.7/dist-packages/whois/_3_adjust.py", line 60, in str_to_date
    raise ValueError("Unknown date format: '" + s + "'")
ValueError: Unknown date format: '2008-03-20T15:21:52+1300'

Original comment by [email protected] on 27 Jun 2012 at 9:29

from python-whois.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 25, 2024
Looks like a bug in Python 2.x.
In 3.x works fine ...

>>> from datetime import datetime
>>> datetime.strptime('2008-03-20T15:21:52+1300', '%Y-%m-%dT%H:%M:%S%z')

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/_strptime.py", line 317, in _strptime
    (bad_directive, format))
ValueError: 'z' is a bad directive in format '%Y-%m-%dT%H:%M:%S%z'

Someone forgot to implement %z :]
http://docs.python.org/library/datetime.html#strftime-strptime-behavior

I added a workaround in 0.6.4

Original comment by [email protected] on 27 Jun 2012 at 12:35

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.