This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib.request | |
def is_disposable_email(email: str) -> bool: | |
e = email.split('@')[-1] | |
for ln in urllib.request.urlopen("https://disposable.github.io/disposable-email-domains/domains.txt"): | |
if ln.decode('utf-8').strip() == e: | |
return True | |
return False |