node-ytsr
Simple js only module to search YouTube
Doesn't need any login or GoogleAPI key
Usage
var ytsr = require('ytsr');
ytsr.get_filters('github', function(err, filters) {
var filter = filters['type'].find((o) => {return o.name == 'Video'})
var options = {
limit: 5,
nextpage_ref: filter.ref,
}
ytsr.search(null, options, function(err, search_results) {
if(err) throw err;
dosth(search_results);
});
})
API
ytsr.search(search_string, [options, callback])
Searches for the given string
Pulls avaible filters for the given string
Related / Works well with
Install
npm install --save ytsr
License
MIT