fedir / yrank

Youtube's channels and playlists videos ranking

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

yrank = Youtube Rank analyzer

Build Status codecov

Package which helps You to priorize a Youtube channel or playlist items for watching.

It could be quite helpful, when You would like to choose the most interesting videos of an IT conference.

Local installation

Go 1.14+ should be installed. Go environment is very simple to install.

To install the package :

go get -u github.com/fedir/yrank

Usage

Youtube Data API

IMPORTANT: You should have a Youtube API key to use the application. You could crуate it at Google Developers Console.

Follow next steps to use build yrank locally and to build and use :

  • Create a new project
  • Enable YouTube Data API v3
  • Create API key for this API
  • Copy config.example.toml to config.toml in the application folder and define Your YouTube Data API v3 key there.
  • Build the project with go build
  • Run a sample ./yrank -p PL_QKjHDgmNzp7DA4KIR4qC-bjIVDlYdkk -s positive-interest -o table -m 10

CLI options

Usage of ./yrank:
-p string
        Youtube playlist ID
-c string
        Youtube channel ID
-s string
    Sorting (default "likes", could be "positive-interest", "total-interest", "total-reaction", "global-buzz-index", "positive-negative-coefficient" or "pnc")
-o string
        Output format (default "table", could be "markdown")
-m int
    The maximum number of items that should be returned
-d bool
        Debug mode for more details during API exchange

Getting single playlist statistics

To launch the application You should just precise the ID of the playlist via CLI (this ID could be found in the URL of the playlist, it's the "?playlistId=" variable value).

yrank -p PLAYLIST-ID

To output ranking in markdown:

yrank -p PLAYLIST-ID -o markdown

Getting the statistics of a whole user's channel

First of all, You must find the channel ID of the user. It's not always that easy. Sometimes it's in URL of Youtube's user profile. Sometimes, You should look for it in the code of the page.

yrank -c CHANNEL-ID
yrank -c CHANNEL-ID -o markdown -s positive-interest

Examples

./yrank -p PL2ntRZ1ySWBdatAqf-2_125H4sGzaWngM
./yrank -p PL2ntRZ1ySWBdatAqf-2_125H4sGzaWngM -o markdown -s positive-interest

Results samples

About

Youtube's channels and playlists videos ranking

License:GNU General Public License v3.0


Languages

Language:Go 98.4%Language:Shell 1.6%