@ernestoyoofi/yt.loader-to

1.5.0-release • Public • Published

@ernestoyoofi/yt.loader-to

Readme for "Bahasa Indonesia"

Simple api youtube downloader is not official from en.loader.to.

A simple node.js downloading video or audio from youtube.

📂 Instalation

You can install with npm or yarn.

npm i @ernestoyoofi/yt.loader-to --save
yarn add @ernestoyoofi/yt.loader-to

✍️ Usage

const yt = require("@ernestoyoofi/yt.loader-to")

yt.download

// Details, check in files test.js
const yt = require("@ernestoyoofi/yt.loader-to")

// 📂 Download Media
yt.download({
  yt_link: "https://music.youtube.com/watch?v=m8Zqd58XuoA&list=OLAK5uy_n0t6KymP-tb3EUjViyWXXA4cT1raHJEl8", // Enter the YouTube video url here
  yt_format: "mp3", // Choose several formats to download, you can see it in the script configuration ./lib/config.js
  logs: true, // Just for check running (default: false)
  saveId: true // saves url to load in case anyone downloads with same url id (default: false)
}).then(results => {
  console.log(results)
})

Results, This data appears after the download is complete.

// Results data in time 18/04/2023 (Asia/Jakarta)

{
  info: {
    image: 'https://i.ytimg.com/vi/m8Zqd58XuoA/hqdefault.jpg',
    title: 'Kawaii Aesthetic',
    description: 'Provided to YouTube by IIP-DDS\n' +
      '\n' +
      'Kawaii Aesthetic · Tollan Kim\n' +
      '\n' +
      'Kawaii Aesthetic\n' +
      '\n' +
      '℗ Tollan Kim\n' +
      '\n' +
      'Released on: 2022-06-15\n' +
      '\n' +
      'Composer: Lucas de Oliveira Santos\n' +
      '\n' +
      'Auto-generated by YouTube.',
    view: 1571,
    like: 26,
    id: 'm8Zqd58XuoA',
    yt_url: 'https://youtu.be/m8Zqd58XuoA?feature=share',
    channel: {
      pp: 'https://yt3.ggpht.com/iAwS5R6mvBqkzrGVqgMdHOWZy38gdZnoa4quANIQ4wzkWs2YmspKvLCzG9sK3lTba86KvC4E7A=s48-c-k-c0x00ffffff-no-rj',
      name: 'Tollan Kim - Topik',
      url_ch: 'https://youtube.com/channel/UCJmVKm8H-Pe62TumtF0bZTQ'
    }
  },
  media: 'https://marilyn7.oceansaver.in/pacific/?k7Ck2foXI1QgGl9rQ37bjBE9HXQ'
}

yt.info

// Details, check in files test.js
const yt = require("@ernestoyoofi/yt.loader-to")

// 📃 Youtube Information Video
yt.ytInfo({
  yt_link: "https://youtube.com/watch?v=4V4hl7xMBN4" // Enter the YouTube video url here
}).then(results => {
  console.log(results)
})

The result data after the request is completed.

// Results data in time 18/04/2023 (Asia/Jakarta)

{
  image: 'https://i.ytimg.com/vi/4V4hl7xMBN4/hqdefault.jpg',
  title: 'METAMORPHOSIS (Arabic Version)',
  description: 'Provided to YouTube by DistroKid\n' +
    '\n' +
    'METAMORPHOSIS (Arabic Version) · YAD Oud\n' +
    '\n' +
    'METAMORPHOSIS (Arabic Version)\n' +
    '\n' +
    '℗ YAD Oud\n' +
    '\n' +
    'Released on: 2023-01-19\n' +
    '\n' +
    'Auto-generated by YouTube.',
  view: 79102,
  like: 3,
  id: '4V4hl7xMBN4',
  yt_url: 'https://youtu.be/4V4hl7xMBN4?feature=share',
  channel: {
    pp: 'https://yt3.ggpht.com/pvRn3YQ-taoDHVAovO7zY1KaGlOUCKiyc2u5TYChpZXfhaaKY_dIkY9JHHrYcWsVBB4QB7b2GQ=s48-c-k-c0x00ffffff-no-rj',
    name: 'YAD Oud',
    url_ch: 'https://youtube.com/channel/UCKy7co9mviDMq6u2JIL_Rsw'
  }
}

🪄 Another variable

// 📃 Config
const yt = require("@ernestoyoofi/yt.loader-to")

console.log(yt._cfg.yt_host)
// Return → ["music.youtube.com", "www.youtube.com", "www.youtube-nocookie.com", "youtube.com", "youtu.be"]

console.log(yt._cfg.format)
// Return → {
//   video: ["480","720","1080","1440","4k","8k"],
//   audio: ["mp3","ogg","wav","m4a","webm","aac","opus"]
// }

console.log(yt._cfg.host)
// Return → "https://loader.to"
// 🪄 Validation
const yt = require("@ernestoyoofi/yt.loader-to")

yt._valid.youtube_url("https://music.youtube.com/watch?v=v6HFc5I0hr8")
// Return → {
//   valid: true,
//   id: "v6HFc5I0hr8"
// }

yt._valid.format_download("1080")
// Return → {
//   format: "1080",
//   media_type: "video"
// }

yt._valid.get_url_ajax("info")
// Return → "https://loader.to/ajax/download.php"

Package Sidebar

Install

npm i @ernestoyoofi/yt.loader-to

Weekly Downloads

33

Version

1.5.0-release

License

MIT

Unpacked Size

21 kB

Total Files

10

Last publish

Collaborators

  • ernestoyoofi