Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sazumiviki-api

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sazumiviki-api - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

6

api/fbdl.js
const axios = require('axios');
const cheerio = require('cheerio');
async function fbdl(url) {
async function facebook(url) {
try {

@@ -44,3 +44,3 @@ const { data } = await axios.post('https://getmyfb.com/process', new URLSearchParams({

if (urls.length === 0) {
throw new Error('Erorr');
throw new Error('No se encontraron enlaces de descarga');
}

@@ -57,2 +57,2 @@

module.exports = fbdl;
module.exports = facebook;

@@ -11,33 +11,18 @@ const axios = require('axios');

form.append('cacheLimit', 0);
try {
const resp = await axios('https://www.screenshotmachine.com/capture.php', {
method: 'post',
data: form,
headers: {
'origin': 'https://www.screenshotmachine.com',
'referer': 'https://www.screenshotmachine.com/',
'sec-fetch-dest': 'empty',
'sec-fetch-mode': 'cors',
'sec-fetch-site': 'same-origin',
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.1418.52',
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'Cookie': ''
}
});
const cookies = resp.headers['set-cookie'];
const buffer = await axios(`https://www.screenshotmachine.com/${resp.data.link}`, {
headers: {
'cookie': cookies.join('')
},
responseType: 'arraybuffer'
});
return Buffer.from(buffer.data);
} catch (error) {
throw new Error(`Error while capturing screenshot: ${error.message}`);
}
let res = await axios({
url: 'https://www.screenshotmachine.com/capture.php',
method: 'post',
data: form
});
let cookies = res.headers['set-cookie'];
let buffer = await axios({
url: 'https://www.screenshotmachine.com/' + res.data.link,
headers: {
'cookie': cookies.join('')
},
responseType: 'arraybuffer'
});
return Buffer.from(buffer.data);
}
module.exports = sswebA;
{
"name": "sazumiviki-api",
"version": "1.0.3",
"version": "1.0.4",
"description": "sazumiviki-api adalah salah satu modul yang membuat kode Anda bekerja dengan mudah, sehingga Anda dapat menghasilkan apa yang Anda inginkan dengan mudah",

@@ -33,3 +33,4 @@ "main": "index.js",

},
"type": "commonjs"
"main": "index.js",
"module": "index.js"
}
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