Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Email Scraper

Email Scraper is a Streamlit web application that finds publicly displayed email addresses on websites listed in an Excel file.

The application allows users to:

  • Upload an Excel workbook containing website URLs
  • Choose the worksheet and column containing the URLs
  • Extract emails from each website's main page and, when found, a contact page
  • Watch live progress and a scrolling log window
  • Download the original data with an added Emails column

It is intended for researchers, marketers, and other non-technical users who need to collect publicly available business contact information from a list of websites.


🚀 Features

  • Excel file upload — accepts .xlsx and .xls workbooks.
  • Worksheet and column selection — works with any worksheet and any URL-column name.
  • Email extraction — scans a site's home page and one likely contact page.
  • Real-time logging — shows the latest processing messages in the app.
  • Elapsed-time logging — every log message shows the time since processing began.
  • Per-site email list — logs every email found for each successfully processed website.
  • Progress indicator — displays the current website number and completion percentage.
  • Resilient processing — invalid, unavailable, or blocked URLs are skipped without stopping the rest of the file.
  • Downloadable results — preserves every original column and appends an Emails column.

🛠 How It Works

  1. Upload an Excel workbook.
  2. Select the worksheet to process.
  3. Select the column that contains website URLs.
  4. Optionally set a request timeout and delay between websites.
  5. Click Start email extraction.
  6. Review the log and download the completed Excel file.

The result uses the same rows and columns as the uploaded worksheet. Each row receives a semicolon-separated list of found email addresses in the new Emails column.


🏗 Code Structure

  • app.py — Streamlit interface: upload, settings, progress, live logs, preview, and download.
  • scraper.py — website requests, URL validation, contact-page detection, and email extraction.
  • requirements.txt — Python dependencies.

📌 Installation and Local Use

1. Install Python

Install Python 3.10 or later from python.org.

During installation, tick Add Python to PATH. Then open PowerShell and confirm that Python is available:

python --version

If python is not recognised, try:

py --version

2. Clone this repository

Open PowerShell in the folder where you want to keep the project, then run:

git clone https://github.com/Erzinrost/Email-Scrapper.git
cd Email-Scraper

Alternatively, select Code → Download ZIP on GitHub, extract the ZIP file, and open PowerShell inside the extracted Email-Scraper folder.

3. Create and activate a virtual environment (optional)

This keeps the project's packages separate from other Python projects:

python -m venv .venv
.\.venv\Scripts\Activate.ps1

If PowerShell reports that scripts are disabled, run this once in the same PowerShell window and then repeat the activation command:

Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass

4. Install the project dependencies

python -m pip install --upgrade pip
python -m pip install -r requirements.txt

5. Start Email Scraper

python -m streamlit run app.py

Your browser should open automatically. If it does not, open the address shown in PowerShell, usually:

http://localhost:8501

To stop the app, return to PowerShell and press Ctrl + C.


📖 Usage Instructions

  1. Open Email Scraper in the browser.
  2. Upload an .xlsx or .xls file.
  3. Select the correct worksheet.
  4. Select the column containing website URLs, such as URL.
  5. Click Start email extraction.
  6. Wait for processing to finish. Problematic URLs are recorded in the log and skipped.
  7. Click Download Excel with Emails column.

🔧 Requirements

  • Python 3.10+
  • Streamlit
  • Pandas
  • Openpyxl
  • Requests
  • Beautiful Soup 4

All Python packages are installed automatically by the pip install -r requirements.txt command above.


⚠️ Important Notes

  • Email Scrapper extracts email addresses publicly present in a website's HTML. Information rendered only by JavaScript may not be found.
  • Invalid URLs, email addresses entered instead of URLs, Cyrillic domains, and unavailable websites are skipped so the rest of the workbook can continue.
  • Some websites rate-limit or block automated requests. Increase the delay in the sidebar if this occurs.
  • Use this tool responsibly and respect each website's terms of service and applicable privacy and data-protection laws.

About

Web scraping app that allows extracting all existing emails from a given URL (supports both Latin and Cyrillic websites).

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages