equal
deleted
inserted
replaced
84 * base WhoisEntry class inherits from dict |
84 * base WhoisEntry class inherits from dict |
85 * fixed TLD's: .org, .info |
85 * fixed TLD's: .org, .info |
86 |
86 |
87 |
87 |
88 |
88 |
89 Contact |
89 Problems? |
90 ======= |
90 ========= |
91 |
91 |
92 You can post ideas or patches here: |
92 Pull requests are welcome! |
93 https://bitbucket.org/richardpenman/pywhois/issues |
|
94 |
93 |
95 Thanks to the many who have sent patches for additional domains! |
94 Thanks to the many who have sent patches for additional TLDs. If you want to add or fix a TLD it's quite straightforward. |
|
95 See example domains in `whois/parser.py <https://bitbucket.org/richardpenman/pywhois/src/tip/whois/parser.py?at=default&fileviewer=file-view-default>`_ |
|
96 |
|
97 Basically each TLD has a similar format to the following: |
|
98 |
|
99 .. sourcecode:: python |
|
100 |
|
101 class WhoisOrg(WhoisEntry): |
|
102 """Whois parser for .org domains |
|
103 """ |
|
104 regex = { |
|
105 'domain_name': 'Domain Name: *(.+)', |
|
106 'registrar': 'Registrar: *(.+)', |
|
107 'whois_server': 'Whois Server: *(.+)', |
|
108 ... |
|
109 } |
|
110 |
|
111 def __init__(self, domain, text): |
|
112 if text.strip() == 'NOT FOUND': |
|
113 raise PywhoisError(text) |
|
114 else: |
|
115 WhoisEntry.__init__(self, domain, text) |