How anisayari/topic-modeling-youtube works
This is a Flask web app for collecting YouTube channel comments and exploring the saved data. The main workflow is: submit one or more channels, queue extraction, fetch channel/video metadata and comments in parallel, and save progress as per-channel JSON files; users can then inspect channel statistics and video details. The README also describes topic modeling as a planned capability, not an implemented runtime flow. The source excerpt is partial, so some endpoint and worker wiring is based on documented behavior rather than inspected implementation.
Main entry points: app.py Flask app and API · index.html Web interface · data Channel records
Components 21
Web interface
- Web interface
templates/index.html - Flask app and API
app.py
Comment extraction
- Channel lookup
app.py - Extraction queue
app.py - Queue worker
app.py - Channel metadata
app.py - Video listing
app.py - Comment extraction
app.py - Progress and cancellation
app.py
Data storage
- Channel records
data - Video comment records
data
Data insights
- Channel statistics
app.py - Channel and video detail
app.py - Insight visualizations
templates/index.html
Planned topics
- Data loading
- Text preprocessing
- Vectorization
- Topic algorithms
- Dimensionality reduction
Other components
- User
- YouTube
Connections 26
- User → Web interface: uses
- Web interface → Flask app and API: sends requests
- Flask app and API → Channel lookup: looks up channel
- Channel lookup → YouTube: queries metadata
- Flask app and API → Extraction queue: enqueues channels
- Extraction queue → Queue worker: dispatches jobs
- Queue worker → Channel metadata: resolves channel
- Channel metadata → YouTube: fetches listing
- Queue worker → Video listing: processes videos
- Video listing → YouTube: fetches video data
- Queue worker → Comment extraction: extracts comments
- Comment extraction → YouTube: requests comments
- Queue worker → Channel records: writes metadata
- Queue worker → Video comment records: saves per video
- Flask app and API → Progress and cancellation: reports or stops
- Flask app and API → Channel statistics: serves statistics
- Channel statistics → Channel records: reads metadata
- Channel statistics → Video comment records: counts comments
- Flask app and API → Channel and video detail: serves details
- Channel and video detail → Channel records: reads metadata
- Channel and video detail → Video comment records: reads videos
- Web interface → Insight visualizations: renders insights
- Data loading → Text preprocessing: planned stage
- Text preprocessing → Vectorization: planned stage
- Vectorization → Topic algorithms: planned stage
- Topic algorithms → Dimensionality reduction: planned stage