New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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 - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

2

package.json
{
"name": "playdl-music-extractor",
"version": "2.0.1",
"version": "2.0.2",
"description": "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",

@@ -5,0 +5,0 @@ "main": "./src/index.js",

@@ -11,3 +11,3 @@ const FacebookParser = require('facebook-video-link');

} || undefined,
StreamDownloadBoolenRecord = null,
StreamDownloadBoolenRecord = undefined,
) {

@@ -20,7 +20,7 @@ const FacebookData = await FacebookParser(Url);

? FacebookData.title.slice(0, 35)
: null)
: undefined)
?? (FacebookData && FacebookData[0] && FacebookData[0].title
? FacebookData.title.slice(0, 35)
: null)
?? null,
: undefined)
?? undefined,
'facebook',

@@ -27,0 +27,0 @@ YoutubeStreamOptions,

@@ -13,3 +13,3 @@ const { validate } = require('play-dl');

},
StreamDownloadBoolenRecord = null,
StreamDownloadBoolenRecord = undefined,
) {

@@ -40,3 +40,3 @@ const ValidateUrlResult = await validate(Query);

? false
: null)
: undefined)
?? ValidateUrlResult.includes('playlist')

@@ -49,3 +49,3 @@ ?? ValidateUrlResult.includes('album')

YoutubeStreamOptions,
null,
undefined,
StreamDownloadBoolenRecord,

@@ -52,0 +52,0 @@ ),

@@ -11,3 +11,3 @@ const ReverbnationParser = require('reverbnation-scraper');

} || undefined,
StreamDownloadBoolenRecord = null,
StreamDownloadBoolenRecord = undefined,
) {

@@ -20,7 +20,7 @@ const ReverbnationData = await ReverbnationParser.getInfo(Url);

? ReverbnationData.title.slice(0, 35)
: null)
: undefined)
?? (ReverbnationData && ReverbnationData[0] && ReverbnationData[0].title
? ReverbnationData.title.slice(0, 35)
: null)
?? null,
: undefined)
?? undefined,
'reverbnation',

@@ -27,0 +27,0 @@ YoutubeStreamOptions,

@@ -5,5 +5,5 @@ const SoundCloud = require('@sidislive/soundcloud-scraper');

class SoundCloudExtractor {
static #TokenGen = null
static #TokenGen = undefined
static #Client = null
static #Client = undefined

@@ -18,3 +18,3 @@ static async SoundCloudResolver(

} || undefined,
StreamDownloadBoolenRecord = null,
StreamDownloadBoolenRecord = undefined,
) {

@@ -74,24 +74,24 @@ if (!SoundCloudExtractor.#TokenGen) {

} || undefined,
StreamDownloadBoolenRecord = null,
StreamDownloadBoolenRecord = undefined,
) {
const track = {
Id: SoundCloudRawTrack.id,
url: SoundCloudRawTrack.url ?? null,
title: SoundCloudRawTrack.title ?? null,
author: SoundCloudRawTrack.author.name ?? null,
author_link: SoundCloudRawTrack.author.url ?? null,
description: SoundCloudRawTrack.description ?? null,
url: SoundCloudRawTrack.url ?? undefined,
title: SoundCloudRawTrack.title ?? undefined,
author: SoundCloudRawTrack.author.name ?? undefined,
author_link: SoundCloudRawTrack.author.url ?? undefined,
description: SoundCloudRawTrack.description ?? undefined,
custom_extractor: 'play-dl -> soundcloud',
duration: SoundCloudRawTrack.duration ?? null,
duration: SoundCloudRawTrack.duration ?? undefined,
stream:
SoundCloudRawTrack.streamURL && SoundCloudRawTrack.streamURL !== 'null'
SoundCloudRawTrack.streamURL && SoundCloudRawTrack.streamURL !== 'undefined'
? SoundCloudRawTrack.streamURL
: null ?? null,
: undefined ?? undefined,
orignal_extractor: 'soundcloud',
thumbnail: SoundCloudRawTrack.thumbnail ?? null,
channelId: null,
channel_url: null,
likes: SoundCloudRawTrack.likes ?? null,
thumbnail: SoundCloudRawTrack.thumbnail ?? undefined,
channelId: undefined,
channel_url: undefined,
likes: SoundCloudRawTrack.likes ?? undefined,
is_live: false,
dislikes: null,
dislikes: undefined,
};

@@ -98,0 +98,0 @@ return (

@@ -11,3 +11,3 @@ const { getData, getPreview } = require('spotify-url-info');

} || undefined,
StreamDownloadBoolenRecord = null,
StreamDownloadBoolenRecord = undefined,
) {

@@ -49,3 +49,3 @@ const SpotifyTracksRawData = await getData(Url);

} || undefined,
StreamDownloadBoolenRecord = null,
StreamDownloadBoolenRecord = undefined,
) {

@@ -64,8 +64,8 @@ const VideoThumbnailPreview = await getPreview(

?? VideoThumbnailPreview.link
?? null,
?? undefined,
title:
SpotifyTrackRawData.name
?? (SpotifyTrackRawData.track ? SpotifyTrackRawData.track.name : null)
?? (SpotifyTrackRawData.track ? SpotifyTrackRawData.track.name : undefined)
?? VideoThumbnailPreview.title
?? null,
?? undefined,
author:

@@ -78,3 +78,3 @@ (SpotifyTrackRawData.artists && SpotifyTrackRawData.artists[0]

? SpotifyTrackRawData.track.artists[0].name
: null) ?? null,
: undefined) ?? undefined,
author_link:

@@ -87,7 +87,7 @@ (SpotifyTrackRawData.artists && SpotifyTrackRawData.artists[0]

? SpotifyTrackRawData.track.artists[0].url
: null) ?? null,
: undefined) ?? undefined,
description:
SpotifyTrackRawData.description
?? VideoThumbnailPreview.description
?? null,
?? undefined,
custom_extractor: 'play-dl',

@@ -98,11 +98,11 @@ duration:

? SpotifyTrackRawData.track.duration_ms
: null)
?? null,
: undefined)
?? undefined,
orignal_extractor: 'spotify',
thumbnail: VideoThumbnailPreview.image ?? null,
channelId: null,
channel_url: null,
likes: null,
thumbnail: VideoThumbnailPreview.image ?? undefined,
channelId: undefined,
channel_url: undefined,
likes: undefined,
is_live: false,
dislikes: null,
dislikes: undefined,
};

@@ -109,0 +109,0 @@ const CompleteTracks = await PlayDLExtractor.DataExtractorYoutube(

@@ -6,3 +6,3 @@ const { search, validate, stream } = require('play-dl');

Query,
extractor = null,
extractor = undefined,
YoutubeStreamOptions = {

@@ -14,3 +14,3 @@ Limit: 1,

ExtraValue = {},
StreamDownloadBoolenRecord = null,
StreamDownloadBoolenRecord = undefined,
) {

@@ -24,3 +24,3 @@ try {

? { youtube: 'playlist' }
: null)
: undefined)
?? (validate(Query) === 'yt_video' ? { youtube: 'video' } : undefined)

@@ -35,3 +35,3 @@ ?? undefined,

YoutubeStreamOptions,
ExtraValue,
ExtraValue ?? {},
StreamDownloadBoolenRecord,

@@ -64,3 +64,3 @@ ),

? 0
: null)
: undefined)
?? (YoutubeStreamOptions

@@ -75,3 +75,3 @@ && YoutubeStreamOptions.Quality

? [YoutubeStreamOptions.Proxy]
: null) ?? undefined,
: undefined) ?? undefined,
}

@@ -85,3 +85,3 @@ : undefined,

YoutubeVideoRawData,
extractor = null,
extractor = undefined,
YoutubeStreamOptions = {

@@ -93,7 +93,7 @@ Limit: 1,

ExtraValue = {},
StreamDownloadBoolenRecord = null,
StreamDownloadBoolenRecord = undefined,
) {
const SourceStream = StreamDownloadBoolenRecord
? await PlayDLExtractor.#streamdownloader(
YoutubeVideoRawData.url ?? null,
YoutubeVideoRawData.url ?? undefined,
YoutubeStreamOptions,

@@ -104,14 +104,14 @@ )

Id: 0,
url: ExtraValue.url ?? YoutubeVideoRawData.url ?? null,
title: ExtraValue.title ?? YoutubeVideoRawData.title ?? null,
url: ExtraValue.url ?? YoutubeVideoRawData.url ?? undefined,
title: ExtraValue.title ?? YoutubeVideoRawData.title ?? undefined,
author:
ExtraValue.author ?? YoutubeVideoRawData.channel
? YoutubeVideoRawData.channel.name
: null ?? null,
: undefined ?? undefined,
author_link:
ExtraValue.author_link ?? YoutubeVideoRawData.channel
? YoutubeVideoRawData.channel.url
: null ?? null,
: undefined ?? undefined,
description:
ExtraValue.description ?? YoutubeVideoRawData.description ?? null,
ExtraValue.description ?? YoutubeVideoRawData.description ?? undefined,
custom_extractor: 'play-dl',

@@ -121,7 +121,7 @@ duration: ExtraValue.duration ?? YoutubeVideoRawData.durationInSec ?? 0,

? ExtraValue.stream
?? (SourceStream ? SourceStream.stream : null)
?? null
?? (SourceStream ? SourceStream.stream : undefined)
?? undefined
: undefined,
stream_type: StreamDownloadBoolenRecord
? (SourceStream ? SourceStream.type : null) ?? undefined
? (SourceStream ? SourceStream.type : undefined) ?? undefined
: undefined,

@@ -132,11 +132,11 @@ orignal_extractor: extractor ?? 'youtube',

? YoutubeVideoRawData.thumbnail.url
: null ?? null,
: undefined ?? undefined,
channelId:
ExtraValue.author ?? YoutubeVideoRawData.channel
? YoutubeVideoRawData.channel.id
: null ?? null,
: undefined ?? undefined,
channel_url:
ExtraValue.author_link ?? YoutubeVideoRawData.channel
? YoutubeVideoRawData.channel.url
: null ?? null,
: undefined ?? undefined,
likes: ExtraValue.likes ?? YoutubeVideoRawData.likes ?? 0,

@@ -143,0 +143,0 @@ is_live: ExtraValue.is_live ?? YoutubeVideoRawData.live ?? false,

@@ -41,2 +41,9 @@ const SpotifyExtractor = require('./bin/Spotify-Resolver');

/**
* @function StreamDownloader play-dl Stream Downloader for Music Players Node.jsv16
* @param {String} Query Query for Searching Data as Tracks , Playlist or albums
* @param {Object} YoutubeStreamOptions Youtube Stream Options for play-dl
* @returns {Promise<YoutubeData>} play-dlTracks
*/
async function StreamDownloader(

@@ -43,0 +50,0 @@ Query,

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