Skip to content

library fails parsing .ca domains #145

@skjortan23

Description

@skjortan23

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions