
Product
Introducing Module Reachability: Focus on the Vulnerabilities That Matter
Module Reachability filters out unreachable CVEs so you can focus on vulnerabilities that actually matter to your application.
Get lastest videos of user subscriptions in a faster way. (using cookie)
Why not use YouTube's APIv3? The APIv3 does not provide a direct method to do this. You have to get recent uploads of each subscription and sort them by date manually. It is very inefficient.
If you installed yt
globally, you can open your YouTube subscription videos
from terminal. Requires livestreamer
and VLC player.
Currently works on Mac OS X, Linux, Windows.
pip install livestreamer
npm -g i yt
yt
By default, yt
will store your cookie and cache file in ~/.config/yt/
.
Run yt -h
for available command-line options.
var yt = require('yt');
// How to get cookie:
// 1. Open Google Chrome and right click the page and select Inspect Element.
// 2. Go to https://www.youtube.com/, log in if you don't have.
// 3. In Networks tab, click Documents and right click the first item in the
// list and click Copy as cURL.
// 4. Copy the values of SID, HSID, SSID, LOGIN_INFO.
var cookie = {
"SID": "",
"HSID": "",
"SSID": "",
"LOGIN_INFO": ""
};
// Or you can directly assign the copied string to the cookie variable:
// var cookie = "curl 'https://www.youtube.com/' ... ";
// yt.subscription.get(pages <number/array>, cookie <object/string>)
// returns a Q promise;
yt.subscription.get(1, cookie).then(function(videos) {});
// or page 1 to 5:
yt.subscription.get([1,2,3,4,5], cookie).then(function(videos) {
console.log(videos);
});
Example output:
[ { duration: '3:33',
live: false,
verified: true,
description: 'This is the way salad is supposed to evolve...',
userurl: 'https://www.youtube.com/user/EpicMealTime',
username: 'Epic Meal Time',
id: 'wfIAjuxbfr4',
url: 'https://www.youtube.com/watch?v=wfIAjuxbfr4',
thumbnails: {
default: 'https://i.ytimg.com/vi/wfIAjuxbfr4/default.jpg',
hqdefault: 'https://i.ytimg.com/vi/wfIAjuxbfr4/hqdefault.jpg',
mqdefault: 'https://i.ytimg.com/vi/wfIAjuxbfr4/mqdefault.jpg',
sddefault: 'https://i.ytimg.com/vi/wfIAjuxbfr4/sddefault.jpg',
maxresdefault: 'https://i.ytimg.com/vi/wfIAjuxbfr4/maxresdefault.jpg'
},
title: 'Poultry Salad - Epic Meal Time',
time: '3 hours ago',
views: '15,804 views' },
...
]
FAQs
Get lastest videos of your YouTube subscriptions.
We found that yt demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Module Reachability filters out unreachable CVEs so you can focus on vulnerabilities that actually matter to your application.
Company News
Socket is bringing best-in-class reachability analysis into the platform — cutting false positives, accelerating triage, and cementing our place as the leader in software supply chain security.
Product
Socket is introducing a new way to organize repositories and apply repository-specific security policies.