This web application performs sentiment analysis on YouTube video comments. It utilizes Flask for the web framework, NLTK for sentiment analysis, and Plotly for data visualization. The YouTube Data API is used to retrieve video information and comments.
-
Install the required dependencies using the following command:
pip install -r requirements.txt
-
Obtain a YouTube Data API key from the Google Cloud Console.
-
Replace the placeholder in
YoutubeCommentScrapper.py
with your YouTube Data API key:DEVELOPER_KEY = "YOUR_API_KEY"
-
Run the Flask application:
python app.py
-
Open your web browser and go to http://127.0.0.1:5000/ to use the application.
-
app.py: Main Flask application file.
-
Senti.py: Module for extracting video ID, performing sentiment analysis, and other related functions.
-
YoutubeCommentScrapper.py: Module for saving video comments to a CSV file, getting channel information, and retrieving video statistics.
-
static/: Directory for static files such as CSS, JavaScript, and images.
-
templates/: Directory for HTML templates used by Flask.
YouTubeSentimentAnalysis/ │ ├── app.py ├── Senti.py ├── YoutubeCommentScrapper.py ├── static/ │ ├── css │ └── images ├── templates/ │ ├── index.html ├── venv/ ├── requirements.txt ├── .gitignore ├── LICENSE └── README.md
- Enter a valid YouTube video link in the provided form.
- Click the "Analyze" button to retrieve and analyze video comments.
- View channel information, video statistics, and sentiment analysis results.
- Visualize sentiment analysis results with bar and pie charts.
- The web application uses the Flask web framework, NLTK for sentiment analysis, and Plotly for data visualization.
- Special thanks to the developers of the Google API Python client library.
We welcome contributions from the community to enhance and improve the YouTube Sentiment Analysis Web App. Whether you are fixing a bug, adding a new feature, or improving design, your contributions are highly appreciated.
Follow the coding style and structure of the existing codebase. Write clear and concise comments where necessary. Test your changes thoroughly before submitting a pull request. Keep dependencies up-to-date and document any new dependencies introduced.