Created
August 28, 2019 21:54
-
-
Save mike-pete/022d00498173557bdb18814767cc49e8 to your computer and use it in GitHub Desktop.
Python script to dump emails from a web page
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 requests, re | |
url = 'http://lemonshell.com' | |
emails = [] | |
site = requests.get(url).content.decode('utf-8') | |
reg = re.compile('[\w\d\.]+@[\w\d\.]+\.[\w]{2,}') | |
for email in reg.findall(site): | |
if email not in emails: | |
emails.append(email) | |
print(email) | |
print(f'\n\nEmails Found: {len(emails)}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment