Skip to content

vaclavsvejcar/youtube-history-downloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YouTube History Downloader

Have you ever wanted to see your full YouTube watching history, but found out that YouTube doesn't allow you to do that? Scrolling down the history to get records more than few days back would be really a awful experience. Fortunately, here comes the YouTube History Downloader, small tool written in Scala, that allows you to fetch your entire history within few minutes!

Please note this tool is still in development, so it might not work 100% and some functionality and documentation might be missing.

Main Features

  • multiplatform (running on Java, supports macOS, Windows, GNU/Linux)
  • downloads history into CSV file
  • generates fancy HTML report from the CSV file

Planned Features

  • proper GUI to make it more friendly for people without command-line knowledge
  • refactor the main logic as a proper library so you can use it in your code
  • improve the HTML report (more options, better performance)

Get the YouTube cookies

In order that YouTube History Downloader can fetch your YouTube history, you must copy the YouTube-related cookies from your web browser into the cookies.txt file placed inside the project main directory. Here are steps how to do it:

  1. Open YouTube in your web browser.
  2. Find one of the request in Developer tools and copy the Cookie HTTP request header content.

  3. Copy that string into the cookies.txt file. The content should look like this:
    VISITOR_INFO1_LIVE=someTokenHere; PREF=f1=someTokenHere; CONSENT=YES+CZ.cs+20151207-13-0; YSC=someTokenHere; GPS=1;     SID=someTokenHere; HSID=someTokenHere; SSID=someTokenHere; APISID=T-someTokenHere/someTokenHere; SAPISID=someTokenHere; LOGIN_INFO=someTokenHere==
    

Run from SBT

  1. Clone this repository: git clone https://github.com/vaclavsvejcar/youtube-history-downloader.git
  2. Enter SBT console: $ sbt
  3. Fetch the history using the > run fetch command. This will save the history data into the history.csv file. Now you can open this file in your favorite CSV editor, or generate the HTML report.
  4. You can generate the HTML report using > run report command. This will generate HTML file report.html.

    Please note that for large history files, opening the report in web browser may take some time.

Command line options

You can get the list of bellow option either by running the java -jar yhd.jar --help (binary) or run --help (SBT):

Usage: yhd [fetch|report] [options]

  --help                   Prints this help text
Command: fetch [options]
Fetches the youtube history into the output CSV file
  -c, --cookies <file>     file containing the copied YouTube cookies (default: cookies.txt)
  -o, --output <file>      Output CSV file with YouTube history (default: history.csv)
Command: report [options]
Generates pretty HTML report from the previously fetched CSV file
  -o, --output <file>      Output HTML file with the generated report (default: report.html)

Run from production binaries

coming soon!

Next steps

Are you missing some cool feature or have you found a bug? Feel free to open new issue, or create a merge request :-)

About

⏪ Download and browse your full YouTube watch history

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published