-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
library fails parsing .ca domains #145
Comments
The following code I hacked together to be able to parse .ca domains in parse.py |
See forked project: |
Hm would be nice if the maintainer of the core library @joepie91 could pull the fixes in the fork. There are fixes for this. Or let me know if you want me to make a pull request with the fix. |
When performing a whois for Canadian domains the library crashes with a KeyError.
to reproduce.
import pythonwhois res = pythonwhois.get_whois('cns.ca')
error:
Traceback (most recent call last): File "/Users/skjortan/intelliagg/test_pythonwhois.py", line 3, in <module> res = pythonwhois.get_whois('cns.ca') File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pythonwhois/__init__.py", line 8, in get_whois return parse.parse_raw_whois(raw_data, normalized=normalized, never_query_handles=False, handle_server=server_list[-1]) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pythonwhois/parse.py", line 516, in parse_raw_whois data["registrar"].insert(0, match.group(1).strip()) KeyError: 'registrar'
The text was updated successfully, but these errors were encountered: