Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Email Extractor Script

Overview

This Python script extracts valid email addresses from any text or HTML file.
It handles encoded characters like @ (@) and ignores invalid email-like patterns.


Files Included

File Name Description
extract_emails.py Main Python script for extracting emails
index.html Sample HTML file for testing
sample.txt Sample text file for testing

Requirements

  • Python 3.7 or higher
  • Works on Windows, macOS, and Linux
  • No external libraries required

Usage

python extract_emails.py <filename>

Example 1: Extract from HTML

python extract_emails.py index.html

Example 2: Extract from Text

python extract_emails.py sample.txt

🧪 Sample Output

For the provided index.html, output will be similar to: