Skip to content

Commit

Permalink
Do not use ascii encode (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
nakamichiworks authored May 17, 2021
1 parent d72e212 commit 791be1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion netcleanser/email.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
DOMAIN_NAME_REGEX: Final[str] = re.compile(r'(([\da-zA-Z])([_\w-]{,62})\.){,127}(([\da-zA-Z])[_\w-]{,61})?([\da-zA-Z]\.((xn\-\-[a-zA-Z\d]+)|([a-zA-Z\d]{2,})))', re.IGNORECASE)

def _looks_domain(x: str) -> bool:
domain_name = x.lower().strip().encode('ascii')
domain_name = x.lower().strip()
return True if re.match(DOMAIN_NAME_REGEX, x) else False

def _automatic_correction(email: str) -> str:
Expand Down

0 comments on commit 791be1a

Please sign in to comment.