Skip to content

A simple python script to analyze youtube watch history

Notifications You must be signed in to change notification settings

kaxevgg/youtube-analytics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

YouTube Analytics

This is an analytics script written in Python that parses the data output provided by Google. Currently the functionality is limited to calculating total time in seconds spent on YouTube.

The Youtube Video API can be found here

Setup Instructions

  1. Go to Google Takeout
  2. Scroll down to section that reads "YouTube and YouTube Music"
  3. Click on "All YouTube data included"
  4. Click on "Deselect all"
  5. Select "history" and "subscriptions" and click "OK"
  6. Click on "Multiple formats"
  7. Change the output format for "history" to JSON and click "OK"
  8. Click on "Next step"
  9. Select your preferred method of delivery. Google may take some time to export it.
  10. Once it's ready, copy the watch-history.json file in the downloaded folder to the cloned git repository
  11. Run python3 history.py. The script will ask you for some inputs.
  12. Enter your Google Cloud API Key. Learn how to get one here.
  13. Enter the name of the video-history file (By default, this is called watch-history.json.
  14. Enter the name of the output file to cache the results
  15. Hooray! You have successfully the script. Hopefully you haven't wasted too much time on YouTube! :-)

About

A simple python script to analyze youtube watch history

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages