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 - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

21

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

@@ -27,11 +27,11 @@ "main": "./src/index.js",

"docs": "jsdoc node_modules/.bin/jsdoc --configure .jsdoc.json --verbose",
"test": "node test/workaround.js"
"test": "node .test/workaround.js"
},
"devDependencies": {
"@babel/eslint-parser": "^7.17.0",
"@babel/preset-env": "^7.16.11",
"@babel/eslint-parser": "^7.18.2",
"@babel/preset-env": "^7.18.2",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^8.10.0",
"eslint": "^8.17.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-import": "^2.26.0",
"jsdoc": "^3.6.10",

@@ -41,3 +41,3 @@ "jsdoc-babel": "^0.5.0",

"nyc": "^15.1.0",
"semantic-release": "^19.0.2"
"semantic-release": "^19.0.3"
},

@@ -71,7 +71,8 @@ "config": {

"@sidislive/soundcloud-scraper": "^1.0.1",
"axios": "^0.26.1",
"axios": "^0.27.2",
"ffmpeg-static": "^5.0.0",
"is-url": "^1.2.4",
"isomorphic-unfetch": "^3.1.0",
"lyrics-finder": "^21.7.0",
"play-dl": "^1.8.9",
"play-dl": "^1.9.5",
"prism-media": "^1.3.2",

@@ -81,3 +82,3 @@ "proxies-generator": "^1.0.6",

"reverbnation-scraper": "^2.0.0",
"spotify-url-info": "^2.2.7"
"spotify-url-info": "^3.1.2"
},

@@ -84,0 +85,0 @@ "directories": {

@@ -154,5 +154,5 @@ <div align="center">

- **new playdl.streamExtractor()** | **playdlQuick.streamExtractor()**
- **new playdl.softExtractor()** | **playdlQuick.softExtractor()**
- **new playdl.exec()** | **playdlQuick.exec()**
- **new playdl.streamExtractor()** OR **playdlQuick.streamExtractor()**
- **new playdl.softExtractor()** OR **playdlQuick.softExtractor()**
- **new playdl.exec()** OR **playdlQuick.exec()**

@@ -159,0 +159,0 @@ ##### Option's Scheme :

@@ -66,2 +66,3 @@ const {

}
__searchResults = (

@@ -134,5 +135,3 @@ await playdlEngine.#__customSearch(

__validateResults[1] = __validate
? __validate?.slice(3, __validate?.length)
: undefined;
__validateResults[1] = __validate ? __validate?.split('_')?.[1] : undefined;
switch (__validateResults[0]) {

@@ -188,3 +187,4 @@ case 'youtube':

__videoDetails = (await video_info(__rawResults[0]?.url))?.video_details;
__videoDetails = (await video_info(__rawResults[0]?.url))
?.video_details;
return __videoDetails ? [__videoDetails] : __rawResults[0];

@@ -191,0 +191,0 @@ }

@@ -1,2 +0,3 @@

const { getData, getPreview } = require('spotify-url-info');
const fetch = require('isomorphic-unfetch');
const { getData, getPreview } = require('spotify-url-info')(fetch);
const { setToken } = require('play-dl');

@@ -18,9 +19,7 @@ const playdlEngine = require('./__playdlEngine');

return returnRegexValue
&& Boolean(spotify.__spotifyRegex.find((regExp) => regExp.test(rawUrl)))
&& Boolean(spotify.__spotifyRegex.find((regExp) => regExp.test(rawUrl)))
? rawUrl?.match(
spotify.__spotifyRegex.find((regExp) => rawUrl.match(regExp)),
) ?? false
: Boolean(
spotify.__spotifyRegex.find((regExp) => regExp.test(rawUrl)),
);
spotify.__spotifyRegex.find((regExp) => rawUrl.match(regExp)),
) ?? false
: Boolean(spotify.__spotifyRegex.find((regExp) => regExp.test(rawUrl)));
} catch {

@@ -79,24 +78,24 @@ return false;

const __processedTracks = (
await Promise.all(
__arryData?.map(async (rawTrack) => {
if (
!rawTrack
|| (__cacheCount
&& __cacheCount >= __scrapperOptions?.fetchOptions?.fetchLimit)
) return undefined;
__cacheGarbage = await spotify.__trackParser(
rawTrack,
++__cacheCount,
__scrapperOptions,
__cacheMain,
);
return __cacheGarbage?.[0];
}),
)
)?.filter(Boolean) ?? [];
await Promise.all(
__arryData?.map(async (rawTrack) => {
if (
!rawTrack
|| (__cacheCount
&& __cacheCount >= __scrapperOptions?.fetchOptions?.fetchLimit)
) return undefined;
__cacheGarbage = await spotify.__trackParser(
rawTrack,
++__cacheCount,
__scrapperOptions,
__cacheMain,
);
return __cacheGarbage?.[0];
}),
)
)?.filter(Boolean) ?? [];
return {
playlist: Boolean(
__rawData?.tracks?.items
&& Array.isArray(__rawData?.tracks?.items)
&& __rawData?.tracks?.items?.length > 0,
&& Array.isArray(__rawData?.tracks?.items)
&& __rawData?.tracks?.items?.length > 0,
),

@@ -159,4 +158,4 @@ tracks: __processedTracks,

? `https://open.spotify.com/track/${
rawTrack?.id ?? rawTrack?.track?.id
}`
rawTrack?.id ?? rawTrack?.track?.id
}`
: undefined),

@@ -163,0 +162,0 @@ );

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

this.description = rawBlueprint?.description;
this.author = { name: rawBlueprint?.author, url: rawBlueprint?.author_link };
this.author = {
name: rawBlueprint?.author,
url: rawBlueprint?.author_link,
};
this.extractorModel = {

@@ -26,0 +29,0 @@ orignal: rawBlueprint?.orignal_extractor ?? 'Unknown',

@@ -37,3 +37,3 @@ const uriCheck = require('is-url');

rawQuery,
undefined,
{ orignal_extractor: 'youtube' },
__scrapperOptions,

@@ -40,0 +40,0 @@ __cacheMain,

@@ -19,18 +19,2 @@ const path = require('path');

/**
* @constructor
* @param {scrapperOptions} __scrapperOptions -> Scrapping Options for functions and base Source Engine
*/
constructor(__scrapperOptions = playdl.#__privateCaches.__scrapperOptions) {
super();
this.__scrapperOptions = {
...playdl.#__privateCaches.__scrapperOptions,
...__scrapperOptions,
fetchOptions: {
...playdl.#__privateCaches?.fetchOptions,
...__scrapperOptions?.fetchOptions,
},
};
}
/**
* @static

@@ -65,2 +49,18 @@ * @private

/**
* @constructor
* @param {scrapperOptions} __scrapperOptions -> Scrapping Options for functions and base Source Engine
*/
constructor(__scrapperOptions = playdl.#__privateCaches.__scrapperOptions) {
super();
this.__scrapperOptions = {
...playdl.#__privateCaches.__scrapperOptions,
...__scrapperOptions,
fetchOptions: {
...playdl.#__privateCaches?.fetchOptions,
...__scrapperOptions?.fetchOptions,
},
};
}
/**
* exec() -> Raw and in-built function for fetching Data for other methods with no exceptions

@@ -88,3 +88,3 @@ * @param {string} rawQuery -> A String Value for Song Name or Url to be Parsed and Fetch Data about it

throw new Error(
'playdl-music-playdl Error : Invalid Query is Provided to Parse and Stream for Client',
'playdl-music-extractor Error : Invalid Query is Provided to Parse and Stream for Client',
);

@@ -97,3 +97,9 @@ }

if (facebook.__test(rawQuery)) return await facebook.__extractor(rawQuery, __scrapperOptions, this);
if (reverbnation.__test(rawQuery)) return await reverbnation.__extractor(rawQuery, __scrapperOptions, this);
if (reverbnation.__test(rawQuery)) {
return await reverbnation.__extractor(
rawQuery,
__scrapperOptions,
this,
);
}
if (deezer.__test(rawQuery)) return await deezer.__extractor(rawQuery, __scrapperOptions, this);

@@ -103,3 +109,3 @@ if (youtube.__test(rawQuery)) return await youtube.__extractor(rawQuery, __scrapperOptions, this);

throw new Error(
'playdl-music-playdl Error : Un-Supportable Query is Provided to Parse and Stream for Client',
'playdl-music-extractor Error : Un-Supportable Query is Provided to Parse and Stream for Client',
);

@@ -106,0 +112,0 @@ } catch (rawError) {

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