Code Monkey home page Code Monkey logo

youtube_time_tracking's Introduction

Youtube Time Tracking

Script to compute stats on how much time you watched Youtube, aggregated by day and channel name.

The output is a CSV file, which will look like this:

Day,TOTAL,YUYUの日本語Podcast,マコなり社長,Teppei,Nihongo SWiTCH
2021-07-29,36,20,,16,
2021-07-30,52,20,18,,14
2021-07-31,0,,,,

Usage

IMPORTANT: To use this, you first need go to extract "YouTube and YouTube Music" data for your account.

Go to https://takeout.google.com, click on "Deselect all".

How to export 1

Scroll down to find the "YouTube and YouTube Music" section. Add it to the export by ticking the box, then click on "Multiple formats".

How to export 2

For "History" entry, make sure you select "JSON" instead of the default "HTML".

How to export 3

Then follow the instructions to download a ZIP file with your data.

Extract the zip file, it should contain the file takeout/YouTube and YouTube Music/history/watch-history.json which you will give to the program.

Go the release page and grab the latest version for your platform.

Run it and follow the instructions to get your CSV file !

Setup

To setup the project from sources and build the executables, here are the instructions for Ubuntu Linux (should work on other platforms supporting Python):

sudo apt install python3-virtualenv
virtualenv venv
source venv/bin/activate
pip3 install ".[cx_freeze]"
python3 -m yttt.gui

To build a standalone executable:

python3 cx_freeze_setup.py build_exe
./build/exe.linux-x86_64-3.8/yttt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.