Skip to content

Instantly share code, notes, and snippets.

View Dheirya's full-sized avatar
🍌
I am bananas

Dheirya Tyagi Dheirya

🍌
I am bananas
View GitHub Profile
@Dheirya
Dheirya / emailvalidator.py
Created June 11, 2022 17:13
Python Spam Email Validator
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