YouTubeTools
This package provides youtube functions without needing an API key for any of them.
Methods
ytt.format('cool video with ducks')
ytt.format('https://www.youtube.com/playlist?list=PLCxjFBEyIgt1FmIYPZrodi19Vv_Z8K9LJ')
ytt.format('YdzEQmuZw6M')
await ytt.valid('woof')
await ytt.valid('iZ0hyEBxj1Q')
await ytt.valid('iiiiiiiiiii')
await ytt.video('lLeLDDmhbFw')
await ytt.channel('UC6zqgjyGaf_b6nd3rqR7MUA') || await ytt.channel('proxbomb')
await ytt.playlist('PLToKALUfVcJDbcWImpZ-IQxaTkUtbprAh')
await ytt.query('funny duck compilation')
await ytt.download('VIjSkkmhCTM')
Options and Paging
await ytt.playlist('PLYqMopOHwQ8hm6tCpbJavL_izixM76SyX', { min: 400 })
await ytt.playlist('PLYqMopOHwQ8hm6tCpbJavL_izixM76SyX', { min: 200, max: 200 })
await ytt.playlist('PLYqMopOHwQ8hm6tCpbJavL_izixM76SyX', { full: true })
let playlist = await ytt.playlist('PLYqMopOHwQ8hm6tCpbJavL_izixM76SyX')
console.log(playlist.items.length)
if(playlist.items.continuation) await playlist.items.more()
console.log(playlist.items.length)
await ytt.query('duck noises', { filter: 'video', max: 5 })
let search = await ytt.query('ducks making very weird noises', { min: 50 })
console.log(search.items.length)
if(search.items.continuation) await search.items.more()
console.log(search.items.length)
See structure.js for the object definitions.