Simple youtube scraper with fast download
const { Youtube } = require('@neoxr/youtube-scraper')
const yt = new Youtube({
fileAsUrl: false
})
// download audio (only 128kbps)
yt.fetch('https://youtu.be/rzk4mUgDjC8?si=U9L8ev0FAjYxPF9H').then(console.log)
// download video
yt.fetch('https://youtu.be/rzk4mUgDjC8?si=U9L8ev0FAjYxPF9H', 'video', '480p').then(console.log)
// download audio by query (only 128kbps)
yt.play('wide awake').then(console.log)
// download video by query
yt.play('wide awake', 'video', '480p').then(console.log)
This library maybe works on a few servers, recomend to use Singapure or Indonesia Proxy
const { Youtube } = require('@neoxr/youtube-scraper')
const yt = new Youtube({
fileAsUrl: false,
proxy: {
host: '1.2.3.4',
port: 8080
}
})