# darshitvarshney/freelance_web_scrapping architecture

> Architecture diagram of the GitHub repository darshitvarshney/freelance_web_scrapping, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/darshitvarshney/freelance_web_scrapping
- Repository: https://github.com/darshitvarshney/freelance_web_scrapping

## Overview

This repository is a Google Maps business-lead scraper with a standard asynchronous mode, a production-oriented mode with batching and resume support, and a separate workbook-merging utility. The main workflow loads city/state data, searches Maps, collects listing details, optionally extracts website emails, and exports city sheets to Excel; merging produces a deduplicated dataset. The README documents several stages and capabilities beyond the sampled excerpts. Edges use README statements where source excerpts do not show the relationship; unsampled implementation details are not inferred.

Main entry points: [`main2.py`](https://github.com/darshitvarshney/freelance_web_scrapping/blob/main/main2.py) (Production scraper), [`main.py`](https://github.com/darshitvarshney/freelance_web_scrapping/blob/main/main.py) (Standard scraper), [`combine.py`](https://github.com/darshitvarshney/freelance_web_scrapping/blob/main/combine.py) (Workbook merger), [`USA_Cities_2025_New.xlsx`](https://github.com/darshitvarshney/freelance_web_scrapping/blob/main/USA_Cities_2025_New.xlsx) (City/state workbook)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Inputs and configuration"]
  node_citydata["City/state workbook"]
end

subgraph group_scraping["Scraping workflows"]
  node_standard["Standard scraper<br/>[main.py]"]
  node_production["Production scraper<br/>[main2.py]"]
  node_maps["Google Maps"]
  node_listing["Listing extraction<br/>[main.py]"]
  node_website["Business websites"]
  node_email["Email extraction<br/>[main.py]"]
  node_progress["Resume progress<br/>[main2.py]"]
end

subgraph group_outputs["Exports and consolidation"]
  node_stateexcels["State/city workbooks<br/>[main.py]"]
  node_batchoutput["Batch workbooks<br/>[main2.py]"]
  node_merger["Workbook merger<br/>[combine.py]"]
  node_dedup["Deduplicated dataset<br/>[combine.py]"]
end

node_operator(("Scraper operator"))

node_operator -->|"runs"| node_standard
node_operator -->|"runs"| node_production
node_citydata -->|"loads cities"| node_standard
node_citydata -->|"loads cities"| node_production
node_standard -->|"searches"| node_maps
node_production -->|"searches"| node_maps
node_standard -->|"collects listings"| node_listing
node_production -->|"collects listings"| node_listing
node_listing -->|"visits when available"| node_website
node_website -->|"provides page content"| node_email
node_standard -->|"extracts emails"| node_email
node_production -->|"extracts emails"| node_email
node_standard -->|"exports results"| node_stateexcels
node_production -->|"exports batches"| node_batchoutput
node_production -->|"saves progress"| node_progress
node_stateexcels -->|"merges files"| node_merger
node_batchoutput -->|"merges files"| node_merger
node_merger -->|"removes duplicates"| node_dedup

click node_citydata "https://github.com/darshitvarshney/freelance_web_scrapping/blob/main/USA_Cities_2025_New.xlsx"
click node_standard "https://github.com/darshitvarshney/freelance_web_scrapping/blob/main/main.py"
click node_production "https://github.com/darshitvarshney/freelance_web_scrapping/blob/main/main2.py"
click node_listing "https://github.com/darshitvarshney/freelance_web_scrapping/blob/main/main.py"
click node_email "https://github.com/darshitvarshney/freelance_web_scrapping/blob/main/main.py"
click node_progress "https://github.com/darshitvarshney/freelance_web_scrapping/blob/main/main2.py"
click node_stateexcels "https://github.com/darshitvarshney/freelance_web_scrapping/blob/main/main.py"
click node_batchoutput "https://github.com/darshitvarshney/freelance_web_scrapping/blob/main/main2.py"
click node_merger "https://github.com/darshitvarshney/freelance_web_scrapping/blob/main/combine.py"
click node_dedup "https://github.com/darshitvarshney/freelance_web_scrapping/blob/main/combine.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_citydata toneBlue
class node_standard,node_production,node_maps,node_listing,node_website,node_email,node_progress toneAmber
class node_stateexcels,node_batchoutput,node_merger,node_dedup toneMint
class node_operator toneIndigo
```

## Components

### Inputs and configuration

- [City/state workbook](https://github.com/darshitvarshney/freelance_web_scrapping/blob/main/USA_Cities_2025_New.xlsx): `USA_Cities_2025_New.xlsx`

### Scraping workflows

- [Standard scraper](https://github.com/darshitvarshney/freelance_web_scrapping/blob/main/main.py): `main.py`
- [Production scraper](https://github.com/darshitvarshney/freelance_web_scrapping/blob/main/main2.py): `main2.py`
- **Google Maps**
- [Listing extraction](https://github.com/darshitvarshney/freelance_web_scrapping/blob/main/main.py): `main.py`
- **Business websites**
- [Email extraction](https://github.com/darshitvarshney/freelance_web_scrapping/blob/main/main.py): `main.py`
- [Resume progress](https://github.com/darshitvarshney/freelance_web_scrapping/blob/main/main2.py): `main2.py`

### Exports and consolidation

- [State/city workbooks](https://github.com/darshitvarshney/freelance_web_scrapping/blob/main/main.py): `main.py`
- [Batch workbooks](https://github.com/darshitvarshney/freelance_web_scrapping/blob/main/main2.py): `main2.py`
- [Workbook merger](https://github.com/darshitvarshney/freelance_web_scrapping/blob/main/combine.py): `combine.py`
- [Deduplicated dataset](https://github.com/darshitvarshney/freelance_web_scrapping/blob/main/combine.py): `combine.py`

### Other components

- **Scraper operator**

## Connections

- Scraper operator → Standard scraper: runs (evidence: `README.md`)
- Scraper operator → Production scraper: runs (evidence: `README.md`)
- City/state workbook → Standard scraper: loads cities (evidence: `main.py`)
- City/state workbook → Production scraper: loads cities (evidence: `main2.py`)
- Standard scraper → Google Maps: searches (evidence: `README.md`)
- Production scraper → Google Maps: searches (evidence: `README.md`)
- Standard scraper → Listing extraction: collects listings (evidence: `README.md`)
- Production scraper → Listing extraction: collects listings (evidence: `README.md`)
- Listing extraction → Business websites: visits when available (evidence: `README.md`)
- Business websites → Email extraction: provides page content (evidence: `main.py`)
- Standard scraper → Email extraction: extracts emails (evidence: `main.py`)
- Production scraper → Email extraction: extracts emails (evidence: `main2.py`)
- Standard scraper → State/city workbooks: exports results (evidence: `main.py`)
- Production scraper → Batch workbooks: exports batches (evidence: `README.md`)
- Production scraper → Resume progress: saves progress (evidence: `main2.py`)
- State/city workbooks → Workbook merger: merges files (evidence: `README.md`)
- Batch workbooks → Workbook merger: merges files (evidence: `README.md`)
- Workbook merger → Deduplicated dataset: removes duplicates (evidence: `combine.py`)
