youtube-suggest-gen
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "youtube-suggest-gen", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Fetch Youtube Video Suggestions with the help of Query or URLs", | ||
@@ -5,0 +5,0 @@ "main": "./src/index.js", |
const { search } = require('play-dl'); | ||
const { randomOne } = require('proxies-generator'); | ||
const { getBasicInfo } = require('ytdl-core'); | ||
const { getBasicInfo, relatedVideo } = require('ytdl-core'); | ||
const HttpsProxyAgent = require('https-proxy-agent'); | ||
@@ -31,6 +31,6 @@ | ||
* @method YTSuggestions() -> Fetch Suggestions from Youtube Filtered with Options | ||
* @param {String} YTQuery Youtube Video URL or Search Query | ||
* @param {String} YTQuery Youtube Video URL or Search Query | if 'all' , then it will return everything | ||
* @param {Number|String|undefined} Limit Limit the Return Array Values | ||
* @param {DefaultFilterOptions<Object>|undefined} Filter Filter Options for randomness , proxy vlaues or cookies in search | ||
* @returns | ||
* @returns {Promise<relatedVideo[]>|undefined} Returns Array of Suggestions from ytdl-core . or else returns undefined for errors | ||
*/ | ||
@@ -68,3 +68,4 @@ static async YTSuggestions( | ||
let RandomIndex = 0; | ||
for (let count = 0, len = RelatedVideos.length; len < count; ++count) { | ||
Limit = Limit === 'all' ? RelatedVideos.length : Limit; | ||
for (let count = 0, len = RelatedVideos.length; count < len; ++count) { | ||
if (Number(Limit) <= VideosCache.length) break; | ||
@@ -71,0 +72,0 @@ else if (Filter.random) { |
import { FilterOptions } from './instances' | ||
import { relatedVideo } from 'ytdl-core' | ||
export function suggestons ( | ||
export function suggestions ( | ||
YTQuery: String, | ||
@@ -6,0 +6,0 @@ Limit?: String | Number | undefined, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8084
101