https://youtubepie.herokuapp.com/
Youtube Pie is a web-based application that creates pie charts based on the user's liked videos and subscriptions. Using OAuth2 as an authorization mechanism, the user gives us reading access to their Youtube public and private data, which we then retrieve using the Youtube-API and then process in order to create the pie chart visualizations. These visualizations are then displayed in a webpage that we created using flask in combination with HTML, CSS and Javascript.
Our application has been containerized using Docker and has been uploaded to Docker Hub in case anyone is interested to run locally. Furthermore we used Heroku to host our containerized app for easy and public acccess.
You can visit our webpage in this adress: https://youtubepie.herokuapp.com/
You can clone this repository using (if you use Github CLI):
gh repo clone NickGreen99/Youtube-Pie
or (if you use Git):
git clone https://github.com/NickGreen99/Youtube-Pie
You can pull this repository from docker hub:
docker pull nickgreen99/youtubepie:latest
You can visit our webpage to use the application: https://youtubepie.herokuapp.com/
To run the Python code you'll need:
- Python3
- The pip package management tool ( https://pypi.org/project/pip/ )
- The libraries in the requirements.txt file. In order to install these you do:
pip install -r requirements.txt
To run the code in your editor you need to create a project in the Google Developers Conosole and obtain authorization credentials for OAuth2.0. You can follow the steps described in: https://developers.google.com/youtube/v3/getting-started and https://developers.google.com/identity/protocols/oauth2/web-server
After you have downloaded your client_secrets.json file you need to add it to your project in a new directory that you should name client_secrets
Then you need to add these redirect URIs:
Also if you want to run the app locally you need to comment out the _scheme="https"
part in flow.redirect_uri
functions (lines 125 and 147)
Then you can run the app.py file and then open your browser and type the url: 127.0.0.1:5000
After you have pulled the repository you need to run the docker image using:
docker run -d -p 5000:5000 nickgreen99/youtubepie
and then open your browser and type the url: localhost:5000
First you need to login using your Google account and bypass all the security warnings (they arise because our web app has not been authorized by Google yet)
After you have logged in you can see your pie charts either based on the YouTube channels you have subscribed to or based on the YouTube videos you have liked.
If you want to change accounts you can logout and restart the login process with another Google account