Skip to content
/ StaTube Public

YouTube scraping & statistics GUI app with NLP, NLTK, wordcloud, transcript analysis, comment analysis, sentiment analysis using PySide6 (Qt6).

License

Notifications You must be signed in to change notification settings

Sakth1/StaTube

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

StaTube Banner



STATUBE

A desktop GUI application to fetch, view, and analyze video transcriptions and comments from YouTube, without logging in and not using any API keys.

License Python PySide6

Built using technologies:


β˜€οΈ Table of Contents


🌞 Overview

StaTube is a desktop GUI application built with Python and PySide6. It allows users to fetch, view, and analyze video transcriptions and comments from any YouTube channel without loggining in and not using any API keys.

The application utilizes a local architecture where data is scraped from YouTube and persisted into a local SQLite database (defined in Data/schema.sql). This allows for batch operations, offline viewing of fetched transcripts, and data storing capabilities.


πŸ“Έ Screenshots


πŸ”₯ Features

  • πŸ”“ No Credentials Needed: Use the application immediatelyβ€”no registration, login, or API key is required.
  • 🎯 Channel Scraping: Fetch the list of videos from any specific YouTube channel.
  • πŸ“„ Transcription Retrieval: Retrieve and display video transcriptions (if available).
  • πŸ’¬ Comment Analysis: Fetch and display user comments for specific videos.
  • 🧰 Modern GUI: A responsive desktop interface built with PySide6.
  • πŸ”„ Batch Operations: Support for processing multiple videos.
  • πŸ“ Analysis Export: Export transcript and comment analysis image.
  • πŸ’Ύ Local Database: All data is structured and stored locally using SQLite.

πŸŒ… Project Structure

└── StaTube/
    β”œβ”€β”€ .github
    β”‚   β”œβ”€β”€ dependabot.yml
    β”‚   └── workflows
    β”‚   	β”œβ”€β”€ build-release.yml
    β”‚   	└── python-package.yml
    β”œβ”€β”€ Analysis
    β”‚   β”œβ”€β”€ __init__.py
    β”‚   β”œβ”€β”€ SentimentAnalysis.py
    β”‚   └── WordCloud.py
    β”œβ”€β”€ assets
    β”‚   β”œβ”€β”€ ER_Diagram.png
    β”‚   β”œβ”€β”€ gif
    β”‚   β”œβ”€β”€ icon
    β”‚   β”œβ”€β”€ StaTube .png
    β”‚   β”œβ”€β”€ StaTube_logo.png
    β”‚   └── wireframe.excalidraw
    β”œβ”€β”€ Backend
    β”‚   β”œβ”€β”€ __init__.py
    β”‚   β”œβ”€β”€ ScrapeChannel.py
    β”‚   β”œβ”€β”€ ScrapeComments.py
    β”‚   β”œβ”€β”€ ScrapeTranscription.py
    β”‚   └── ScrapeVideo.py
    β”œβ”€β”€ build
    β”‚   └── installer
	β”‚   	└── installer
	β”‚   		β”œβ”€β”€ StaTube.iss
	β”‚  			└── extract_metadata.py
    β”œβ”€β”€ Data
    β”‚   β”œβ”€β”€ __init__.py
    β”‚   β”œβ”€β”€ DatabaseManager.py
    β”‚   └── schema.sql
    β”œβ”€β”€ LICENSE
    β”œβ”€β”€ main.py
    β”œβ”€β”€ requirements.txt
    β”œβ”€β”€ UI
    β”‚   β”œβ”€β”€ __init__.py
    β”‚   β”œβ”€β”€ CommentPage.py
    β”‚   β”œβ”€β”€ Homepage.py
    β”‚   β”œβ”€β”€ MainWindow.py
    β”‚   β”œβ”€β”€ SettingsPage.py
    β”‚   β”œβ”€β”€ SplashScreen.py
    β”‚   β”œβ”€β”€ Style.qss
    β”‚   β”œβ”€β”€ TranscriptPage.py
    β”‚   └── VideoPage.py
    β”œβ”€β”€ utils
    β”‚   β”œβ”€β”€ __init__.py
    β”‚   β”œβ”€β”€ AppState.py
    β”‚   β”œβ”€β”€ CheckInternet.py
    β”‚   β”œβ”€β”€ Config.py
    β”‚   β”œβ”€β”€ Logger.py
    β”‚   β”œβ”€β”€ Proxy.py
    β”‚   └── ProxyThread.py
    └── widgets
        β”œβ”€β”€ __init__.py
        └── DownloadableImage.py

πŸŒ„ Project Index

STATUBE/
__root__
β¦Ώ __root__
File Name Summary
LICENSE MIT License file for the project.
main.py Entry point for the StaTube application. Initializes the PySide6 application loop.
requirements.txt List of Python dependencies required to run the application (e.g., PySide6, aiohttp).
.github
β¦Ώ .github
File Name Summary
dependabot.yml Configuration for Dependabot dependency updates.
workflows
β¦Ώ .github.workflows
File Name Summary
build-release.yml CI/CD workflow for creating the Windows executable and Inno Setup installer.
python-package.yml CI/CD workflow for testing and packaging the Python module.
Analysis
β¦Ώ Analysis
File Name Summary
__init__.py Marks the directory as a Python package.
SentimentAnalysis.py Module for performing sentiment analysis on fetched comments.
WordCloud.py Module for generating visual word clouds from text data (transcripts/comments).
assets
β¦Ώ assets

Directory containing project images, diagrams (ER_Diagram.png, wireframe.excalidraw), icons, GIFs, and the application logo (StaTube_logo.png).

Backend
β¦Ώ Backend
File Name Summary
__init__.py Marks the directory as a Python package.
ScrapeChannel.py Logic for fetching video lists from a YouTube Channel.
ScrapeComments.py Logic for fetching user comments from specific videos.
ScrapeTranscription.py Logic for retrieving video transcripts.
ScrapeVideo.py Core logic for general video metadata scraping.
build
β¦Ώ build
installer
β¦Ώ build.installer
File Name Summary
extract_metadata.py Helper script to extract version and metadata for the installer generation.
StaTube.iss Inno Setup script used to generate the Windows Installer (.exe) for end-users.
Data
β¦Ώ Data
File Name Summary
__init__.py Marks the directory as a Python package.
DatabaseManager.py Handles interactions and operations with the local SQLite database.
schema.sql Defines the SQL schema for the local SQLite database.
UI
β¦Ώ UI
File Name Summary
__init__.py Marks the directory as a Python package.
CommentPage.py UI widget for displaying and interacting with video comments.
Homepage.py The main landing page or dashboard UI component.
MainWindow.py The main window structure and application frame.
SettingsPage.py UI widget for configuring application settings (e.g., proxy).
SplashScreen.py UI component shown during application startup/loading.
Style.qss Qt Stylesheet file for custom application look and feel.
TranscriptPage.py UI widget for viewing and analyzing video transcripts.
VideoPage.py UI component for displaying video list and metadata.
utils
β¦Ώ utils
File Name Summary
__init__.py Marks the directory as a Python package.
AppState.py Manages and holds the global state of the application.
CheckInternet.py Utility function to verify network connectivity.
Config.py Handles application configuration and settings management.
Logger.py Utility for application logging and error handling.
Proxy.py Module for managing proxy connection details.
ProxyThread.py Threading logic for asynchronous proxy operations.
widgets
β¦Ώ widgets
File Name Summary
__init__.py Marks the directory as a Python package.
DownloadableImage.py Custom widget for displaying images that can be downloaded.

πŸš€ Getting Started

🌟 Prerequisites

This project requires the following dependencies:

  • Programming Language: Python 3.9 or later
  • Package Manager: Pip

⚑ Installation

Windows:

Go to the Releases page and download the installer or portable version.

Linux/macOS:

Build StaTube from the source and install dependencies:

  1. Clone the repository:

    git clone https://github.com/Sakth1/StaTube.git
  2. Navigate to the project directory:

    cd StaTube
  3. Install UV package manager:

    pip install uv
  4. Create a virtual environment:

    uv venv

    with specific python version

    uv venv -python 3.11
  5. Activate the virtual environment:

    Windows:

    .venv/Scripts/activate 

    Linux/macOS:

    source venv/bin/activate
  6. Install dependencies:

    uv pip install -r requirements.txt

πŸ”† Usage

Run the project with:

python main.py
  1. Search for the channel you want to do comment/transcript analysis.
  2. Select the channel.
  3. Select videos from the channel and scrape transcripts or comment.
  4. Analysis will be done and you will be able to visualize and download the analysis.

πŸ“¦ Building the Installer

The project includes an automated workflow to create a portable executable and Windows Installer (.exe).

  1. Workflow: The .github/workflows/build-release.yml file handles the CI/CD pipeline.
  2. Inno Setup: The installer is generated using Inno Setup, utilizing the configuration script located at build/installer/StaTube.iss.
  3. Metadata: build/installer/extract_metadata.py is used during the build process to ensure the installer is versioned correctly.

To generate the installer locally, you must have Inno Setup installed and compile the StaTube.iss script after generating the executable.


🌻 Roadmap

  • Export analysis: Export and save analysis result image to a file.
  • Theming: Light/Dark theme support.
  • In-App Help: Built-in documentation and help guide.
  • Proxy Settings: Ability to configure network proxy settings.
  • Docker Version: A Dockerized version of the application is planned.

🀝 Contributing

Contributing Guidelines
  1. Fork the Repository: Start by forking the project repository to your account.
  2. Clone Locally: Clone the forked repository to your local machine.
    git clone https://github.com/Sakth1/StaTube.git
  3. Create a New Branch: Always work on a new branch, giving it a descriptive name.
    git checkout -b new-feature-x
  4. Make Your Changes: Develop and test your changes locally.
  5. Commit Your Changes: Commit with a clear message describing your updates.
    git commit -m 'Implemented new feature x.'
  6. Push to Remote: Push the changes to your forked repository.
    git push origin new-feature-x
  7. Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
  8. HAVE FUN! πŸš€

πŸ“œ License

StaTube is protected under the MIT License because sharing is caring ❀️. For more details, refer to the LICENSE file.


✨ Acknowledgments

YOU ALL ARE OFFICIALLY GREAT!


BACK TO TOP