New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@vioo/apis

Package Overview
Dependencies
Maintainers
0
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vioo/apis - npm Package Compare versions

Comparing version

to
1.3.2

5

package.json
{
"name": "@vioo/apis",
"version": "1.3.0",
"version": "1.3.2",
"description": "One module for all APIs, scraper and others",

@@ -28,4 +28,5 @@ "main": "scraper.js",

"form-data": "^4.0.2",
"fs-extra": "^11.3.0"
"fs-extra": "^11.3.0",
"path": "^0.12.7"
}
}

14

scraper.js

@@ -8,2 +8,3 @@ // © Sanjaya

const FormData = require('form-data')
const path = require('path')
const { spawn } = require('child_process')

@@ -135,2 +136,5 @@ const YTDL = require('@distube/ytdl-core')

const downloadFolder = '/home/container/'
if (!fs.existsSync(downloadFolder)) fs.mkdirSync(downloadFolder)
async function ytdlv1(url, type, qual = null) {

@@ -153,3 +157,3 @@ let cookie

if (type === 'mp3') {
const file_path = `../../../${file_id}.mp3`
const file_path = path.join(downloadFolder, `${file_id}.mp3`)
const audio_url = await litterbox(file_path)

@@ -210,3 +214,2 @@

let format_video = formats.find(f => f.quality.includes(`${qual}p`) && !f.hasAudio) || formats.find(f => f.quality.includes('p') && !f.hasAudio)
let format_audio = formats.find(f => f.hasAudio)

@@ -216,4 +219,5 @@

const video_path = `../../../${file_id}.mp4`
const video_path = path.join(downloadFolder, `${file_id}.mp4`)
const video_url = await litterbox(video_path)
const video_stream = YTDL(url, {

@@ -389,3 +393,3 @@ quality: format_video.itag,

const file_name = `${randomKarakter(4)}.${type}`
const file_path = `../../../${file_name}`
const file_path = path.join(downloadFolder, file_name)
const video_url = await litterbox(file_path)

@@ -396,3 +400,3 @@

if (type === 'mp3') {
const output_file = `../../../${randomKarakter(4)}.mp3`
const output_file = path.join(downloadFolder, `${randomKarakter(4)}.mp3`)
const audio_url = await litterbox(output_file)

@@ -399,0 +403,0 @@ await convert_audio(file_path, output_file, quality)