How to extract email from a website URL using Python

In this post we will learn how to extract email addresses from a specific website or a URL using Python Programming Language. Here we are using regex and request module.

Module Installation Code
pip install requests
Extracting Code
import re
import requests

url = "https://www.techcvr.net/contact-us/"
EMAIL_REGEX = r"[\w\.-][email protected][\w\.-]+"

r = requests.get(url)

for re_match in re.findall(EMAIL_REGEX, r.text)"
    print(re_match)

DONE & ENJOY

1 thought on “How to extract email from a website URL using Python”

  1. Way cool! Some very valid points! I appreciate you writing this article
    and also the rest of the website is also really good.
    I visited many blogs except the audio quality for audio
    songs present at this site is genuinely fabulous.
    I visited many blogs however the audio quality for audio songs current at this web
    site is in fact wonderful. http://cars.com

    Take a look at my homepage: Jason

Leave a Comment

Your email address will not be published. Required fields are marked *