@neoxr/youtube-scraper

2.2.2 • Public • Published

Youtube Scraper

Simple youtube scraper with fast download

How to use ??

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)

Example with Proxy

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
   }
})

Package Sidebar

Install

npm i @neoxr/youtube-scraper

Weekly Downloads

81

Version

2.2.2

License

MIT

Unpacked Size

35.6 kB

Total Files

3

Last publish

Collaborators

  • neoxr