# piyush-nr-tiwari/zomato-scraper architecture

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

- Interactive diagram: https://gitdiagram.com/piyush-nr-tiwari/zomato-scraper
- Repository: https://github.com/piyush-nr-tiwari/zomato-scraper

## Overview

This is a small command-line Zomato restaurant scraper. The user supplies a listing URL and page count; the script requests each page, extracts restaurant details, and writes rows to rest.csv. The parsing and CSV-writing responsibilities live in the same script, so they are represented together rather than as separate runtime components. The source shows requests and writes directly; it does not show error handling or other integrations.

Main entry points: [`zomato.py`](https://github.com/piyush-nr-tiwari/zomato-scraper/blob/master/zomato.py) (Scraper), [`rest.csv`](https://github.com/piyush-nr-tiwari/zomato-scraper/blob/master/rest.csv) (rest.csv)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_scraper["Scraper<br/>[zomato.py]"]
node_zomato["Zomato"]
node_csv["rest.csv<br/>[rest.csv]"]

node_user -->|"enters inputs"| node_scraper
node_scraper -->|"requests pages"| node_zomato
node_scraper -->|"writes rows"| node_csv

click node_scraper "https://github.com/piyush-nr-tiwari/zomato-scraper/blob/master/zomato.py"
click node_csv "https://github.com/piyush-nr-tiwari/zomato-scraper/blob/master/rest.csv"

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_user toneBlue
class node_scraper,node_csv toneTeal
class node_zomato toneIndigo
```

## Components

### Other components

- **User**
- [Scraper](https://github.com/piyush-nr-tiwari/zomato-scraper/blob/master/zomato.py): `zomato.py`
- **Zomato**
- [rest.csv](https://github.com/piyush-nr-tiwari/zomato-scraper/blob/master/rest.csv): `rest.csv`

## Connections

- User → Scraper: enters inputs (evidence: `zomato.py`)
- Scraper → Zomato: requests pages (evidence: `zomato.py`)
- Scraper → rest.csv: writes rows (evidence: `zomato.py`)
