Skip to content

Instantly share code, notes, and snippets.

View commentfuckery's full-sized avatar

Comment Fuckery commentfuckery

View GitHub Profile
@commentfuckery
commentfuckery / scrape.py
Created September 5, 2017 19:35
Web Scraping for Email Addresses and Phone numbers using Python
# Small Python Script to scrape websites for
# email addresses and phone numbers(not a very great RE)
# Author: Dhruv Baldawa (@dhruvbaldawa on twitter)
# Github: http://www.github.com/dhruvbaldawa
import urllib,re
f = urllib.urlopen("http://www.example.com")
s = f.read()
re.findall(r"\+\d{2}\s?0?\d{10}",s)
re.findall(r"[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}",s)