Python Scrapy + Selenium Web Email Scraper Bot Script For Marketing Which Scrapes Emails Addresses From Websites Full Project For Beginners

You are currently viewing Python Scrapy + Selenium Web Email Scraper Bot Script For Marketing Which Scrapes Emails Addresses From Websites Full Project For Beginners

 

Welcome folks today in this blog post we will be building a email scraper bot script which scrapes email addresses of real people using scrapy and selenium in python. All the full source code of the application is shown below.

 

 

Get Started

 

 

In order to get started you need to install the following libraries using pip command as shown below

 

pip install selenium

 

pip install scrapy

 

pip install scrapy-selenium

 

pip install google

 

After installing all these libraries make a empty folder for your python project and initialize this below command to start a new scrapy project

 

scrapy startproject email_extraction

 

Now it has created a new scrapy project which is called email_extraction now go to this directory

 

cd email_extraction

 

Inside this project you will find this directory structure which is shown below

 

 

 

Inside the spiders folder make a new file called email_extractor.py and copy paste the following code

 

spiders/email_extractor.py

 

 

 

And now just type the below command to start the email scraper and store all the emails as csv file

 

scrapy crawl email_ex -o emails.csv

 

And now after execution of this command this will create the emails.csv file inside the directory as shown below

 

 

 

emails.csv