Skip to content

A Python script that automatically extracts email addresses from comments on a LinkedIn post.

Notifications You must be signed in to change notification settings

bythebug/scrappy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

LinkedIn Email Scraper

A Python automation script that extracts email addresses from comments on any LinkedIn post and saves them to a CSV file.

πŸ“Œ Features

  • πŸ” Extracts email addresses from public LinkedIn post comments
  • πŸ’¬ Captures full comment text (with optional commenter name)
  • βœ… Skips duplicates and plain email-only comments (optional)
  • πŸ—‚οΈ Auto-versioned output files (no overwriting)
  • πŸ–₯️ Uses your own Chrome session (no headless or login automation)

βš™οΈ Requirements

  • macOS or Linux (tested)
  • Python 3.8 or higher
  • Google Chrome (installed)
  • ChromeDriver (must match your Chrome version)

πŸ”§ Install Python packages:

pip install selenium pandas

πŸš€ How to Use

  1. Clone or download this repository.

  2. Update the post URL in linkedin_scraper.py:

POST_URL = 'https://www.linkedin.com/feed/update/urn:li:activity:YOUR_POST_ID/'
  1. Run the script:
python3 linkedin_scraper.py
  1. A Chrome window will open:
    • Log in to LinkedIn if needed
    • The script will scroll and extract all visible comments

πŸ“‚ Output

You’ll get a CSV file like:

linkedin_emails_with_comments.csv

If that file already exists, it auto-generates:

linkedin_emails_with_comments_1.csv
linkedin_emails_with_comments_2.csv

Output Columns:

Author (optional) Email Comment
Saurav Mehta [email protected] Please connect at saurav@...
β€” [email protected] [email protected]

πŸ›‘οΈ Disclaimer

This script is intended for personal use only.
Scraping LinkedIn at scale may violate their Terms of Service.
Use responsibly and ethically.

πŸ™Œ Acknowledgements

  • Built with ❀️ by Suraj Verma
  • Inspired by creators, mentors, and productivity tools
  • Connect on LinkedIn

About

A Python script that automatically extracts email addresses from comments on a LinkedIn post.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages