Path: blob/master/BeautifulSoup/BeautifulSoup_Scrape_emails_from_URL.ipynb
2973 views
Kernel: Python 3
BeautifulSoup - Scrape emails from URL
Tags: #beautifulsoup #python #scraping #emails #url #webscraping #html
Author: Florent Ravenel
Last update: 2023-04-12 (Created: 2023-02-16)
Description: This notebook will show how to scrape emails stored in HTML webpage using BeautifulSoup.
Input
Import libraries
In [ ]:
Setup Variables
url
: URL of the webpage to scrapelimit
: number of emails found to stop scraping
In [ ]:
Model
Scrape emails from URL
We will use the requests
library to get the HTML content of the webpage and the BeautifulSoup
library to parse the HTML content. We will use a regular expression to extract the emails from the HTML content.
In [ ]:
Output
Display result
In [ ]: