Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

playdl-music-extractor

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

playdl-music-extractor

PlayDL Music Extractor is a Extractor/Scrapper and Helps Players to fetch data from play-dl or Custom Extractors , as Per reduces extra work and credentials

  • 2.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
75
increased by581.82%
Maintainers
1
Weekly downloads
 
Created
Source


PlayDL Music Extractor

About

PlayDL Music Extractor is a Extractor/Scrapper and Helps Players to fetch data from play-dl or Custom Extractors , as Per reduces extra work and credentials.

  • Object-oriented , means Value returned in a structure format
  • Supports Youtube , Spotify , Reverbnation , SoundCloud , Facebook Urls and Even Youtube Search
  • Delay/Buffer Timeout is max 3 seconds on tracks and 7 sec for Playlists
  • Customisable Extractors
  • Performant
  • 100% coverage of play-dl and custom extractors

Installation

Node.js 16 or newer is required.

npm install playdl-music-extractor

Example usage

Extractor Video/Playlist/Album Data from any Platform :-

const { Extractor, StreamDownloader } = require('playdl-music-extractor') //For CommonJS
                            OR
import { Extractor, StreamDownloader } from 'playdl-music-extractor' //for ES6


var Data = await Extractor(Url || Query, {
  Limit: 1,
  Quality: 'highest',
  Proxy: undefined, //[{"Ip-Address:Port-Number"}] Format(Proxy)
  IgnoreError: true,
})

var StreamData = await StreamDownloader(Url || Query, {
  Limit: 1,
  Quality: 'highest',
  Proxy: undefined, //[{"Ip-Address:Port-Number"}] Format(Proxy)
  IgnoreError: true,
})

Strucutre of Data/Track

Data : {
  playlist : Boolean,
  tracks : [
    {
      Id: 0,
      url: String,
      title: String,
      author: String,
      author_link: String,
      description: String,
      custom_extractor: `play-dl`,
      duration: 0,
      stream: String,  // Stream Related things will be sent via StreamDownloader()
      stream_type: String,
      orignal_extractor: 'youtube' | 'spotify' | 'facebook' | 'arbitrary',
      thumbnail: String,
      channelId: 0 || String,
      channel_url: String,
      likes: 0,
      is_live: false,
      dislikes: 0,
}]
}
  • Data.tracks[0].stream can be used in terms of stream value in @discordjs/voice or any other Audio package After using - StreamDownloader() .

Use-Case/Example for @discordjs/voice Package

const { Extractor } = require('playdl-music-extractor')
const { createAudioResource } = require('@discordjs/voice')

const Data = await Extractor('Despacito', {
  Limit: 1,
  Quality: 'highest',
  Proxy: undefined, //[{"Ip-Address:Port-Number"}] Format(Proxy)
  IgnoreError: true,
})

var Audio_Resource = createAudioResource(Data.tracks[0].stream ,{
  inputType: Data.tracks[0].stream_type
})

//Rest is mentioned in @discordjs/voice examples , from here "Audio_Resource" is important

  • play-dl
  • Source Code
  • GitHub Repo Link
  • NPM Package
  • Yarn Package

Contributing

Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the ReadMe.md

Help

If you don't understand something in the ReadMe.md , you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official Support Server.

Keywords

FAQs

Package last updated on 21 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc