# superryeti/email-crawler-lead-generator architecture

> Architecture diagram of the GitHub repository superryeti/email-crawler-lead-generator, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/superryeti/email-crawler-lead-generator
- Repository: https://github.com/superryeti/email-crawler-lead-generator

## Overview

This Python command-line crawler takes a starting website, visits same-domain pages, extracts unique email addresses, and records visited URLs. Its main workflow is driven by the recursive crawl loop: each page is fetched and parsed, discovered links are filtered and queued, and page text is scanned for emails. The README documents the same-domain and duplicate-email behavior; the source shows CSV email output and a final visited-URL dump. The runtime is concentrated in one file, so components share its path.

Main entry points: [`email_crawler.py`](https://github.com/superryeti/email-crawler-lead-generator/blob/master/email_crawler.py) (Crawler loop)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_crawl["Crawling"]
  node_crawler["Crawler loop<br/>[email_crawler.py]"]
  node_page["Page processing<br/>[email_crawler.py]"]
  node_queue["URL queue and history<br/>[email_crawler.py]"]
end

subgraph group_extract["Extraction and output"]
  node_email["Email extraction<br/>[email_crawler.py]"]
  node_csv[("Email CSV")]
  node_url_log["Visited URL log"]
end

node_user(("User"))
node_site["Website"]

node_user -->|"provides URL"| node_crawler
node_crawler -->|"processes page"| node_page
node_page -->|"fetches pages"| node_site
node_page -->|"filters and queues"| node_queue
node_crawler -->|"tracks visited URLs"| node_queue
node_page -->|"scans page text"| node_email
node_email -->|"writes unique emails"| node_csv
node_crawler -->|"dumps visited URLs"| node_url_log

click node_crawler "https://github.com/superryeti/email-crawler-lead-generator/blob/master/email_crawler.py"
click node_page "https://github.com/superryeti/email-crawler-lead-generator/blob/master/email_crawler.py"
click node_queue "https://github.com/superryeti/email-crawler-lead-generator/blob/master/email_crawler.py"
click node_email "https://github.com/superryeti/email-crawler-lead-generator/blob/master/email_crawler.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_crawler,node_page,node_queue,node_user toneBlue
class node_email,node_csv,node_url_log toneAmber
class node_site toneIndigo
```

## Components

### Crawling

- [Crawler loop](https://github.com/superryeti/email-crawler-lead-generator/blob/master/email_crawler.py): `email_crawler.py`
- [Page processing](https://github.com/superryeti/email-crawler-lead-generator/blob/master/email_crawler.py): `email_crawler.py`
- [URL queue and history](https://github.com/superryeti/email-crawler-lead-generator/blob/master/email_crawler.py): `email_crawler.py`

### Extraction and output

- [Email extraction](https://github.com/superryeti/email-crawler-lead-generator/blob/master/email_crawler.py): `email_crawler.py`
- **Email CSV**
- **Visited URL log**

### Other components

- **User**
- **Website**

## Connections

- User → Crawler loop: provides URL (evidence: `README.md`)
- Crawler loop → Page processing: processes page (evidence: `email_crawler.py`)
- Page processing → Website: fetches pages (evidence: `email_crawler.py`)
- Page processing → URL queue and history: filters and queues (evidence: `email_crawler.py`)
- Crawler loop → URL queue and history: tracks visited URLs (evidence: `email_crawler.py`)
- Page processing → Email extraction: scans page text (evidence: `email_crawler.py`)
- Email extraction → Email CSV: writes unique emails (evidence: `email_crawler.py`)
- Crawler loop → Visited URL log: dumps visited URLs (evidence: `email_crawler.py`)
