Skip to content

Ibnuawf/Sentiment-Analysis-with-web-scraper-for-youtube

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

15 Commits
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฏ YouTube Comment Classification Web App

This project is a full-stack web application that classifies YouTube video comments using machine learning. It provides a clean interface to fetch, analyze, and visualize comments for content creators and community managers.

๐Ÿ” Features

  • ๐ŸŽฅ YouTube Comment Scraper: Fetches comments using YouTube Data API based on Channel ID.
  • ๐Ÿง  ML Model Integration: Classifies comments into categories like Positive, Negative, Neutral, and Questions.
  • ๐ŸŒ— Dark/Light Mode: Toggle-friendly interface with theme persistence.
  • ๐Ÿ“ˆ Analysis Dashboard: View categorized comments and data insights on a dedicated page.
  • โœ๏ธ Visitor Feedback System: Allows users to submit comments/feedback that are dynamically rendered on the page.
  • ๐Ÿ“ฑ Responsive Design: Fully mobile-optimized with animated transitions and collapsible menus.
  • ๐Ÿ”„ Dynamic Image Display: Rotating images in the About section for visual enhancement.

๐Ÿ“ Project Structure

project/ โ”‚ โ”œโ”€โ”€ app.py # Flask backend logic โ”œโ”€โ”€ sentimentscraper.py # YouTube scraper + comment classifier โ”œโ”€โ”€ requirements.txt # Python dependencies โ”‚ โ”œโ”€โ”€ templates/ โ”‚ โ”œโ”€โ”€ index.html # Homepage with input form and feedback section โ”‚ โ””โ”€โ”€ about.html # View analysis & dynamic comment section โ”‚ โ”œโ”€โ”€ static/ โ”‚ โ”œโ”€โ”€ style.css # Global styling โ”‚ โ”œโ”€โ”€ script1.js # JS logic (theme toggle, API calls, feedback system) โ”‚ โ””โ”€โ”€ images/, videos/ # Visual assets

๐Ÿง  Tech Stack

  • Frontend: HTML5, CSS3, JavaScript, Font Awesome
  • Backend: Python 3, Flask
  • APIs & Libraries:
    • YouTube Data API
    • Custom ML classification logic (classify_text())
    • google-api-python-client
    • flask, requests, etc.

๐Ÿ’ก Use Cases

  • ๐Ÿ“Š Analyze audience sentiment on YouTube
  • ๐Ÿ‘ฎโ€โ™‚๏ธ Flag potential spam or hate comments
  • ๐Ÿ’ฌ Collect and showcase community feedback
  • ๐Ÿ‘จโ€๐Ÿซ Demonstrate full-stack ML web integration

๐Ÿ›  How It Works

  1. User enters a valid YouTube Channel ID.
  2. App fetches recent video comments using the YouTube API.
  3. Each comment is run through a machine learning classifier.
  4. Results are sorted into categories and displayed visually.
  5. Users can also leave feedback, which appears dynamically.

๐Ÿ“ฌ Feedback Handling

  • All feedback is submitted via a form on the homepage.
  • Submitted messages are stored (temporarily or permanently depending on backend setup).
  • New feedback is dynamically added to the community section.

๐Ÿง‘โ€๐Ÿ’ป Author

Made with โค๏ธ by Harshit Bansal

About

It is a website that displays youtube comments and segregate then into positive , negative, neutral, and questions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 27.5%
  • HTML 24.3%
  • JavaScript 24.1%
  • Python 24.1%