playdl-music-extractor
Advanced tools
Comparing version 1.0.3 to 1.0.4
{ | ||
"name": "playdl-music-extractor", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"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", |
@@ -38,3 +38,8 @@ <div align="center"> | ||
var Data = await Extractor(Url || Query) | ||
var Data = await Extractor(Url || Query, { | ||
Limit: 1, | ||
Quality: 'highest', | ||
Proxy: undefined, //[{"Ip-Address:Port-Number"}] Format(Proxy) | ||
IgnoreError: true, | ||
}) | ||
``` | ||
@@ -59,3 +64,3 @@ | ||
stream_type: String, | ||
orignal_extractor: 'youtube' | 'spotify' | 'facebook' | 'arbitary', | ||
orignal_extractor: 'youtube' | 'spotify' | 'facebook' | 'arbitrary', | ||
thumbnail: String, | ||
@@ -79,8 +84,8 @@ channelId: 0 || String, | ||
var Data = await Extractor(Url || "Despacito" , { | ||
const Data = await Extractor('Despacito', { | ||
Limit: 1, | ||
Quality: 'highest', | ||
Proxy: ["IP's Domain:PortNumber"], | ||
} | ||
) | ||
Proxy: undefined, //[{"Ip-Address:Port-Number"}] Format(Proxy) | ||
IgnoreError: true, | ||
}) | ||
@@ -87,0 +92,0 @@ var Audio_Resource = createAudioResource(Data.tracks[0].stream ,{ |
@@ -11,2 +11,3 @@ const { validate } = require('play-dl'); | ||
Proxy: undefined, | ||
IgnoreError: false, | ||
}, | ||
@@ -17,2 +18,3 @@ ) { | ||
UriCheck(Query) | ||
&& YoutubeStreamOptions.IgnoreError | ||
&& (!ValidateUrlResult | ||
@@ -26,5 +28,15 @@ || (ValidateUrlResult && ValidateUrlResult.includes('search'))) | ||
} | ||
if ( | ||
UriCheck(Query) | ||
&& (!ValidateUrlResult | ||
|| (ValidateUrlResult && ValidateUrlResult.includes('search'))) | ||
) { | ||
throw Error('Invalid Query or Url for package is Detected'); | ||
} | ||
const YoutubeTracks = { | ||
playlist: | ||
!ValidateUrlResult | ||
(!ValidateUrlResult | ||
|| (ValidateUrlResult && ValidateUrlResult.includes('search')) | ||
? false | ||
: null) | ||
?? ValidateUrlResult.includes('playlist') | ||
@@ -31,0 +43,0 @@ ?? ValidateUrlResult.includes('album') |
@@ -79,3 +79,3 @@ const SoundCloud = require('@sidislive/soundcloud-scraper'); | ||
duration: SoundCloudRawTrack.duration ?? null, | ||
stream_url: | ||
stream: | ||
SoundCloudRawTrack.streamURL && SoundCloudRawTrack.streamURL !== 'null' | ||
@@ -82,0 +82,0 @@ ? SoundCloudRawTrack.streamURL |
@@ -21,2 +21,3 @@ const SpotifyExtractor = require('./bin/Spotify-Resolver'); | ||
Proxy: undefined, | ||
IgnoreError: false, | ||
} || undefined, | ||
@@ -23,0 +24,0 @@ ) { |
@@ -12,3 +12,3 @@ var YoutubeTrack = { | ||
stream_type: null, | ||
orignal_extractor: null | 'youtube' | 'spotify' | 'facebook' | 'arbitary', | ||
orignal_extractor: null | 'youtube' | 'spotify' | 'facebook' | 'arbitrary', | ||
thumbnail: null, | ||
@@ -15,0 +15,0 @@ channelId: null | 0, |
@@ -12,3 +12,3 @@ export type YoutubeTrack = { | ||
stream_type: String | ||
orignal_extractor: String | 'youtube' | 'spotify' | 'facebook' | 'arbitary' | ||
orignal_extractor: String | 'youtube' | 'spotify' | 'facebook' | 'arbitrary' | ||
thumbnail: String | ||
@@ -26,2 +26,3 @@ channelId: String | Number | ||
Proxy: Array<String> | ||
IgnoreError: Boolean | ||
} | ||
@@ -28,0 +29,0 @@ |
22294
531
113