# luqmanr/web-scraping architecture

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

- Interactive diagram: https://gitdiagram.com/luqmanr/web-scraping
- Repository: https://github.com/luqmanr/web-scraping

## Overview

This repository is a collection of Python tools for gathering social-media and image-search data, preparing celebrity datasets, and cropping faces from images. The clearest end-to-end workflow is image-search screenshots for selected keywords, followed by optional face cropping; the crawler’s crop call is commented out, so the stages are not shown as an active pipeline. Separate Instagram account/follower collection and dataset-arrangement utilities are also present. The README is empty, and several relationships are known only from imports or filenames, so the graph omits unverified connections.

Main entry points: [`chrome-screenshot/face_photo_crawler.py`](https://github.com/luqmanr/web-scraping/blob/master/chrome-screenshot/face_photo_crawler.py) (Keyword crawler), [`chrome-screenshot/google_screenshot.py`](https://github.com/luqmanr/web-scraping/blob/master/chrome-screenshot/google_screenshot.py) (Google images), [`chrome-screenshot/bing_screenshot.py`](https://github.com/luqmanr/web-scraping/blob/master/chrome-screenshot/bing_screenshot.py) (Bing images), [`chrome-screenshot/yahoo_screenshot.py`](https://github.com/luqmanr/web-scraping/blob/master/chrome-screenshot/yahoo_screenshot.py) (Yahoo images)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_image["Image collection"]
  node_crawler["Keyword crawler"]
  node_google["Google images"]
  node_bing["Bing images<br/>[bing_screenshot.py]"]
  node_yahoo["Yahoo images"]
  node_instagramshot["Instagram screenshots"]
  node_main_new["New-version entry<br/>[main.py]"]
end

subgraph group_faces["Face processing"]
  node_face_batch["Face crop batch<br/>[face_cropper.py]"]
  node_mtcnn_old["MTCNN cropper"]
  node_face_batch_new["Face crop batch<br/>[face_cropper.py]"]
  node_mtcnn_new["MTCNN cropper<br/>[mtcnn_cropper.py]"]
end

subgraph group_instagram["Instagram collection"]
  node_ig_collect["Instagram account tools"]
  node_ig_followers["Follower crawlers<br/>[get_followers.py]"]
  node_ig_following["Following crawlers<br/>[get_following.py]"]
  node_ig_profile["Profile lookup<br/>[get_info.py]"]
  node_ig_filter["Account filtering<br/>[filter-name.py]"]
end

subgraph group_datasets["Dataset preparation"]
  node_csv_data["CSV datasets<br/>[process_data.py]"]
  node_arranger["Dataset file tools<br/>[renaming.py]"]
end

node_user(("CLI user"))
node_image_services(("Image search sites"))
node_image_files["Screenshot files"]
node_ig_service(("Instagram"))

node_user -->|"runs"| node_crawler
node_crawler -->|"runs optionally"| node_google
node_crawler -->|"runs optionally"| node_bing
node_crawler -.->|"imports"| node_yahoo
node_crawler -.->|"imports"| node_instagramshot
node_google -->|"searches"| node_image_services
node_bing -->|"searches"| node_image_services
node_yahoo -->|"searches"| node_image_services
node_instagramshot -->|"opens pages"| node_ig_service
node_google -->|"writes screenshots"| node_image_files
node_bing -->|"writes screenshots"| node_image_files
node_yahoo -->|"writes screenshots"| node_image_files
node_instagramshot -->|"writes screenshots"| node_image_files
node_face_batch -->|"calls cropper"| node_mtcnn_old
node_face_batch_new -->|"calls cropper"| node_mtcnn_new
node_mtcnn_old -.->|"reads images"| node_image_files
node_mtcnn_new -.->|"reads images"| node_image_files
node_ig_collect -.->|"collects accounts"| node_ig_service
node_ig_followers -.->|"collects followers"| node_ig_service
node_ig_following -.->|"collects following"| node_ig_service
node_ig_profile -.->|"looks up profiles"| node_ig_service
node_ig_filter -->|"writes results"| node_csv_data
node_arranger -.->|"arranges files"| node_csv_data
node_user -->|"runs"| node_face_batch

click node_crawler "https://github.com/luqmanr/web-scraping/blob/master/chrome-screenshot/face_photo_crawler.py"
click node_google "https://github.com/luqmanr/web-scraping/blob/master/chrome-screenshot/google_screenshot.py"
click node_bing "https://github.com/luqmanr/web-scraping/blob/master/chrome-screenshot/bing_screenshot.py"
click node_yahoo "https://github.com/luqmanr/web-scraping/blob/master/chrome-screenshot/yahoo_screenshot.py"
click node_instagramshot "https://github.com/luqmanr/web-scraping/blob/master/chrome-screenshot/instagram_screenshot.py"
click node_face_batch "https://github.com/luqmanr/web-scraping/blob/master/chrome-screenshot/face_cropper.py"
click node_mtcnn_old "https://github.com/luqmanr/web-scraping/blob/master/chrome-screenshot/mtcnn_face_cropper.py"
click node_face_batch_new "https://github.com/luqmanr/web-scraping/blob/master/new_version/library/face_cropper.py"
click node_mtcnn_new "https://github.com/luqmanr/web-scraping/blob/master/new_version/library/mtcnn_cropper.py"
click node_ig_collect "https://github.com/luqmanr/web-scraping/blob/master/collect-data-instagram/collect-username.py"
click node_ig_followers "https://github.com/luqmanr/web-scraping/blob/master/collect-data-instagram/get_followers.py"
click node_ig_following "https://github.com/luqmanr/web-scraping/blob/master/collect-data-instagram/get_following.py"
click node_ig_profile "https://github.com/luqmanr/web-scraping/blob/master/collect-data-instagram/get_info.py"
click node_ig_filter "https://github.com/luqmanr/web-scraping/blob/master/collect-data-instagram/filter-name.py"
click node_csv_data "https://github.com/luqmanr/web-scraping/blob/master/collect-data-instagram/process_data.py"
click node_arranger "https://github.com/luqmanr/web-scraping/blob/master/dataset-arranger/renaming.py"
click node_main_new "https://github.com/luqmanr/web-scraping/blob/master/new_version/main.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_google,node_bing,node_yahoo,node_instagramshot,node_main_new,node_user,node_image_files toneBlue
class node_face_batch,node_mtcnn_old,node_face_batch_new,node_mtcnn_new toneAmber
class node_ig_collect,node_ig_followers,node_ig_following,node_ig_profile,node_ig_filter toneMint
class node_csv_data,node_arranger toneRose
class node_image_services,node_ig_service toneIndigo
```

## Components

### Image collection

- [Keyword crawler](https://github.com/luqmanr/web-scraping/blob/master/chrome-screenshot/face_photo_crawler.py): `chrome-screenshot/face_photo_crawler.py`
- [Google images](https://github.com/luqmanr/web-scraping/blob/master/chrome-screenshot/google_screenshot.py): `chrome-screenshot/google_screenshot.py`
- [Bing images](https://github.com/luqmanr/web-scraping/blob/master/chrome-screenshot/bing_screenshot.py): `chrome-screenshot/bing_screenshot.py`
- [Yahoo images](https://github.com/luqmanr/web-scraping/blob/master/chrome-screenshot/yahoo_screenshot.py): `chrome-screenshot/yahoo_screenshot.py`
- [Instagram screenshots](https://github.com/luqmanr/web-scraping/blob/master/chrome-screenshot/instagram_screenshot.py): `chrome-screenshot/instagram_screenshot.py`
- [New-version entry](https://github.com/luqmanr/web-scraping/blob/master/new_version/main.py): `new_version/main.py`

### Face processing

- [Face crop batch](https://github.com/luqmanr/web-scraping/blob/master/chrome-screenshot/face_cropper.py): `chrome-screenshot/face_cropper.py`
- [MTCNN cropper](https://github.com/luqmanr/web-scraping/blob/master/chrome-screenshot/mtcnn_face_cropper.py): `chrome-screenshot/mtcnn_face_cropper.py`
- [Face crop batch](https://github.com/luqmanr/web-scraping/blob/master/new_version/library/face_cropper.py): `new_version/library/face_cropper.py`
- [MTCNN cropper](https://github.com/luqmanr/web-scraping/blob/master/new_version/library/mtcnn_cropper.py): `new_version/library/mtcnn_cropper.py`

### Instagram collection

- [Instagram account tools](https://github.com/luqmanr/web-scraping/blob/master/collect-data-instagram/collect-username.py): `collect-data-instagram/collect-username.py`
- [Follower crawlers](https://github.com/luqmanr/web-scraping/blob/master/collect-data-instagram/get_followers.py): `collect-data-instagram/get_followers.py`
- [Following crawlers](https://github.com/luqmanr/web-scraping/blob/master/collect-data-instagram/get_following.py): `collect-data-instagram/get_following.py`
- [Profile lookup](https://github.com/luqmanr/web-scraping/blob/master/collect-data-instagram/get_info.py): `collect-data-instagram/get_info.py`
- [Account filtering](https://github.com/luqmanr/web-scraping/blob/master/collect-data-instagram/filter-name.py): `collect-data-instagram/filter-name.py`

### Dataset preparation

- [CSV datasets](https://github.com/luqmanr/web-scraping/blob/master/collect-data-instagram/process_data.py): `collect-data-instagram/process_data.py`
- [Dataset file tools](https://github.com/luqmanr/web-scraping/blob/master/dataset-arranger/renaming.py): `dataset-arranger/renaming.py`

### Other components

- **CLI user**
- **Image search sites**
- **Screenshot files**
- **Instagram**

## Connections

- CLI user → Keyword crawler: runs (evidence: `chrome-screenshot/face_photo_crawler.py`)
- Keyword crawler → Google images: runs optionally (evidence: `chrome-screenshot/face_photo_crawler.py`)
- Keyword crawler → Bing images: runs optionally (evidence: `chrome-screenshot/face_photo_crawler.py`)
- Keyword crawler → Yahoo images: imports (evidence: `chrome-screenshot/face_photo_crawler.py`)
- Keyword crawler → Instagram screenshots: imports (evidence: `chrome-screenshot/face_photo_crawler.py`)
- Google images → Image search sites: searches (evidence: `chrome-screenshot/google_screenshot.py`)
- Bing images → Image search sites: searches (evidence: `chrome-screenshot/bing_screenshot.py`)
- Yahoo images → Image search sites: searches (evidence: `chrome-screenshot/yahoo_screenshot.py`)
- Instagram screenshots → Instagram: opens pages (evidence: `chrome-screenshot/instagram_screenshot.py`)
- Google images → Screenshot files: writes screenshots (evidence: `chrome-screenshot/google_screenshot.py`)
- Bing images → Screenshot files: writes screenshots (evidence: `chrome-screenshot/bing_screenshot.py`)
- Yahoo images → Screenshot files: writes screenshots (evidence: `chrome-screenshot/yahoo_screenshot.py`)
- Instagram screenshots → Screenshot files: writes screenshots (evidence: `chrome-screenshot/instagram_screenshot.py`)
- Face crop batch → MTCNN cropper: calls cropper (evidence: `chrome-screenshot/face_cropper.py`)
- Face crop batch → MTCNN cropper: calls cropper (evidence: `new_version/library/face_cropper.py`)
- MTCNN cropper → Screenshot files: reads images
- MTCNN cropper → Screenshot files: reads images
- Instagram account tools → Instagram: collects accounts
- Follower crawlers → Instagram: collects followers
- Following crawlers → Instagram: collects following
- Profile lookup → Instagram: looks up profiles
- Account filtering → CSV datasets: writes results (evidence: `collect-data-instagram/filter-name.py`)
- Dataset file tools → CSV datasets: arranges files
- CLI user → Face crop batch: runs (evidence: `chrome-screenshot/face_cropper.py`)
