Skip to content

Instantly share code, notes, and snippets.

@mike-pete
Created August 28, 2019 21:54
Show Gist options
  • Save mike-pete/022d00498173557bdb18814767cc49e8 to your computer and use it in GitHub Desktop.
Save mike-pete/022d00498173557bdb18814767cc49e8 to your computer and use it in GitHub Desktop.
Python script to dump emails from a web page
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