# mashukui/kuaishou_one_spider architecture

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

- Interactive diagram: https://gitdiagram.com/mashukui/kuaishou_one_spider
- Repository: https://github.com/mashukui/kuaishou_one_spider

## Overview

This repository presents a desktop GUI for collecting Kuaishou data and converting links. The documented user flow is to log in, choose a collection or conversion function, provide a keyword or link, and run it; results may be saved as CSV or video files. The README also documents cookie setup, per-page saving, and logs. Source excerpts show the GUI imports the three feature modules, but collection implementations and GUI task wiring are removed or stubbed, so feature-level runtime connections are documented rather than verified in source.

Main entry points: [`src/kuaishou_one_spider.py`](https://github.com/mashukui/kuaishou_one_spider/blob/main/src/kuaishou_one_spider.py) (Collection GUI), [`src/kuaishou_user_post.py`](https://github.com/mashukui/kuaishou_one_spider/blob/main/src/kuaishou_user_post.py) (Profile works), [`src/kuaishou_search_comment.py`](https://github.com/mashukui/kuaishou_one_spider/blob/main/src/kuaishou_search_comment.py) (Search and comments), [`src/kuaishou_trans.py`](https://github.com/mashukui/kuaishou_one_spider/blob/main/src/kuaishou_trans.py) (Link conversion)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Desktop application"]
  node_login["Login screen"]
  node_gui["Collection GUI"]
  node_cookie["Cookie setup"]
end

subgraph group_collection["Data collection"]
  node_search_comment["Search and comments"]
  node_detail["Work details"]
  node_profile_posts["Profile works"]
  node_browser["Browser automation"]
end

subgraph group_conversion["Link conversion"]
  node_link_conversion["Link conversion<br/>[kuaishou_trans.py]"]
end

subgraph group_outputs["Results and operations"]
  node_csv["CSV results"]
  node_video_files["Video files"]
  node_logs["Run logs"]
  node_wait_config["Wait interval<br/>[config_pub.json]"]
end

node_user(("User"))
node_kuaishou{{"Kuaishou"}}

node_user -->|"logs in"| node_login
node_login -->|"opens"| node_gui
node_user -->|"configures"| node_cookie
node_user -->|"selects function"| node_gui
node_gui -->|"offers collection"| node_search_comment
node_gui -->|"offers collection"| node_detail
node_gui -->|"offers collection"| node_profile_posts
node_gui -->|"offers conversion"| node_link_conversion
node_search_comment -->|"collects data"| node_kuaishou
node_detail -->|"collects data"| node_kuaishou
node_profile_posts -->|"collects data"| node_kuaishou
node_link_conversion -->|"converts links"| node_kuaishou
node_search_comment -->|"exports results"| node_csv
node_detail -->|"exports results"| node_csv
node_profile_posts -->|"exports results"| node_csv
node_link_conversion -->|"exports results"| node_csv
node_detail -->|"downloads videos"| node_video_files
node_profile_posts -->|"downloads videos"| node_video_files
node_search_comment -->|"reads interval"| node_wait_config
node_profile_posts -->|"reads interval"| node_wait_config
node_gui -->|"records runs"| node_logs
node_search_comment -->|"uses automation"| node_browser
node_profile_posts -->|"uses automation"| node_browser

click node_login "https://github.com/mashukui/kuaishou_one_spider/blob/main/src/kuaishou_one_spider.py"
click node_gui "https://github.com/mashukui/kuaishou_one_spider/blob/main/src/kuaishou_one_spider.py"
click node_search_comment "https://github.com/mashukui/kuaishou_one_spider/blob/main/src/kuaishou_search_comment.py"
click node_detail "https://github.com/mashukui/kuaishou_one_spider/blob/main/src/kuaishou_search_comment.py"
click node_profile_posts "https://github.com/mashukui/kuaishou_one_spider/blob/main/src/kuaishou_user_post.py"
click node_link_conversion "https://github.com/mashukui/kuaishou_one_spider/blob/main/src/kuaishou_trans.py"
click node_csv "https://github.com/mashukui/kuaishou_one_spider/blob/main/src/kuaishou_search_comment.py"
click node_video_files "https://github.com/mashukui/kuaishou_one_spider/blob/main/src/kuaishou_user_post.py"
click node_logs "https://github.com/mashukui/kuaishou_one_spider/blob/main/src/kuaishou_one_spider.py"
click node_wait_config "https://github.com/mashukui/kuaishou_one_spider/blob/main/config_pub.json"

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_login,node_gui,node_cookie,node_user toneBlue
class node_search_comment,node_detail,node_profile_posts,node_browser toneAmber
class node_link_conversion toneMint
class node_csv,node_video_files,node_logs,node_wait_config toneRose
class node_kuaishou toneIndigo
```

## Components

### Desktop application

- [Login screen](https://github.com/mashukui/kuaishou_one_spider/blob/main/src/kuaishou_one_spider.py): `src/kuaishou_one_spider.py`
- [Collection GUI](https://github.com/mashukui/kuaishou_one_spider/blob/main/src/kuaishou_one_spider.py): `src/kuaishou_one_spider.py`
- **Cookie setup**

### Data collection

- [Search and comments](https://github.com/mashukui/kuaishou_one_spider/blob/main/src/kuaishou_search_comment.py): `src/kuaishou_search_comment.py`
- [Work details](https://github.com/mashukui/kuaishou_one_spider/blob/main/src/kuaishou_search_comment.py): `src/kuaishou_search_comment.py`
- [Profile works](https://github.com/mashukui/kuaishou_one_spider/blob/main/src/kuaishou_user_post.py): `src/kuaishou_user_post.py`
- **Browser automation**

### Link conversion

- [Link conversion](https://github.com/mashukui/kuaishou_one_spider/blob/main/src/kuaishou_trans.py): `src/kuaishou_trans.py`

### Results and operations

- [CSV results](https://github.com/mashukui/kuaishou_one_spider/blob/main/src/kuaishou_search_comment.py): `src/kuaishou_search_comment.py`
- [Video files](https://github.com/mashukui/kuaishou_one_spider/blob/main/src/kuaishou_user_post.py): `src/kuaishou_user_post.py`
- [Run logs](https://github.com/mashukui/kuaishou_one_spider/blob/main/src/kuaishou_one_spider.py): `src/kuaishou_one_spider.py`
- [Wait interval](https://github.com/mashukui/kuaishou_one_spider/blob/main/config_pub.json): `config_pub.json`

### Other components

- **User**
- **Kuaishou**

## Connections

- User → Login screen: logs in (evidence: `README.md`)
- Login screen → Collection GUI: opens (evidence: `src/kuaishou_one_spider.py`)
- User → Cookie setup: configures (evidence: `README.md`)
- User → Collection GUI: selects function (evidence: `README.md`)
- Collection GUI → Search and comments: offers collection (evidence: `README.md`)
- Collection GUI → Work details: offers collection (evidence: `README.md`)
- Collection GUI → Profile works: offers collection (evidence: `README.md`)
- Collection GUI → Link conversion: offers conversion (evidence: `README.md`)
- Search and comments → Kuaishou: collects data (evidence: `README.md`)
- Work details → Kuaishou: collects data (evidence: `README.md`)
- Profile works → Kuaishou: collects data (evidence: `README.md`)
- Link conversion → Kuaishou: converts links (evidence: `README.md`)
- Search and comments → CSV results: exports results (evidence: `README.md`)
- Work details → CSV results: exports results (evidence: `README.md`)
- Profile works → CSV results: exports results (evidence: `README.md`)
- Link conversion → CSV results: exports results (evidence: `README.md`)
- Work details → Video files: downloads videos (evidence: `README.md`)
- Profile works → Video files: downloads videos (evidence: `README.md`)
- Search and comments → Wait interval: reads interval (evidence: `src/kuaishou_search_comment.py`)
- Profile works → Wait interval: reads interval (evidence: `src/kuaishou_user_post.py`)
- Collection GUI → Run logs: records runs (evidence: `README.md`)
- Search and comments → Browser automation: uses automation (evidence: `README.md`)
- Profile works → Browser automation: uses automation (evidence: `README.md`)
