How to Scrape Email Addresses from Websites with Python!

I will be using Python version 3.5.2 to scrape email addresses from a particular website. The code is pretty simple!

Step 1: Open the terminal and type python to run Python.

Step 2: Type import urllib.request, re

Step 3: Define the target website. I will choose /irishjudoassociation.ie/clubs/ for the purposes of this tutorial. In the terminal, type:
target = '/irishjudoassociation.ie/clubs/'

Step 4: The next step is to actually get the data from the website. Type:
text = urllib.request.urlopen(target).read().decode('utf-8')

Step 5: Define the regular expression. Type:
regex = re.compile(r'[\w.-]+@[\w.-]+')
For more information on regular expressions, check out this cheat sheet.

Step 6: Compile using the regular expression. Type:
email = re.findall(regex, text)

Step 7: Type print(email) to display the email addresses in an list in the terminal. If you want the list elements to be separated by row in a csv file (out.csv), type the following:

import csv
with open("out.csv","w") as f:
  wr = csv.writer(f,delimiter="\n")
  wr.writerow(email)

Another option is to to put all together in a .py file and run it by typing python3 filename.py:

import urllib.request
import re
import csv

target = '/www.psychologicalsociety.ie/pd/?pd_s=&pd_d='

text = urllib.request.urlopen(target).read().decode('utf-8')

regex = re.compile(r'[\w.-]+@[\w.-]+')

email = re.findall(regex, text)

with open("out.csv","w") as f:
  wr = csv.writer(f,delimiter="\n")
  wr.writerow(email)

(802) 746-3425

1. /www.familysearch.org/

A genealogy website run by the Church of Latter Day Saints. Record transcripts are free and available to the public for viewing. As for scans of the actual records, some are available to the public and some are not.

2. 7724250098

Free scans of Irish marriage certificates, censuses, etc.

3. 4409018499

Free scans of Irish censuses, etc.

4. 3475952491

Home of three projects providing free scans of UK certificates and censuses: FreeBMD, FreeCEN and FreeREG.

267-583-4657

As I search for some side gigs, I figured that I could share some freelancing websites which seem to be working out for me (for now anyway). I personally only seek out freelancing websites which pay through PayPal. This list will be updated as I find more options!

1. fiverr

You probably already know about this one. My recommendation is doing jobs for cheap (as painful as it may be at the beginning) to get those much needed reviews! I transcribed 30 minutes of audio for a measly $5 for my first gig. Most transcriptionists with a few reviews seem to charge $5 per 15 minutes.

2. Cambly

After a very long approval period (about over a month), I was accepted as a tutor but I can’t say that this website is for me. You get paid about $10 per 60 minutes of chatting with English learners. If you are comfortable with chatting on webcam with lots of different people, this could be a great option for earning some pocket money. Most students are happy to just chat. If they want to follow a lesson plan, they tend to provide the link.

3. CastingWords

As a new transcriptionist, you make about 17 cents an audio minute for a decent transcription (7/9). You are paid more for better quality ones, and an 8 or 9 grade is definitely doable. Higher paid transcription, grading and editing jobs are not available until you reach a certain level (I am yet to figure out what that level is exactly).

4. (412) 948-2009

Nothing to report here just yet, stay tuned!

Good luck! I hope that one, some or all of these work for you!