A node.js parser to extract data from Youtube History HTML file.
The default console output will show you your history sorted by number of watch. Here for example is the video I watched the most in my history data:
To get your history data :
- Go to https://takeout.google.com/settings/takeout
- Login with the account you want the data from
- Then unselect all data source with the dedicated button
- Go to the bottom of the page and check
YouTube et YouTube Music
thenNext step
- Select
Export one time
thenCreate an export
- You will be informed by email when the export is ready.
- You want to look for the
Takeout/YouTube and YouTube Music/history/watch-history.html
in your export uncompressed folder
IT requires Node.js to run.
Install the dependencies and devDependencies. Build the typescript
yarn build
Place your watch-history.html
file in build/assets/watch-history.html
Launch the script (this could take a while)
yarn start
As you can see in the src/interface.ts
, there is more data than the ones shown in the console by default :
export interface YoutubeVideo {
url: string;
title: string;
channel: {
name: string;
url: string;
};
watchDates: string[];
}
You can already select only a year by using src/filters/filterDataForYear
Apache-2.0