Socket
Socket
Sign inDemoInstall

w5-textmaker

Package Overview
Dependencies
33
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.5 to 1.0.6

lib/download/igstalk.js

86

lib/download/instagram.js

@@ -1,37 +0,53 @@

const ig = require("instatouch");
const { isUrl } = require("../../src/helpers/functions");
const options = {
count: 0,
mediaType: "all",
timeout: 0,
};
const qs = require('qs')
const cheerio = require('cheerio')
const axios = require('axios')
const {
default: Axios
} = require('axios')
const cookie = require('cookie')
const fetch = require('node-fetch')
const FormData = require('form-data')
async function instagram(url) {
if (!url) {
throw new Error("Input url !!");
}
if (!isUrl(url)) {
throw new Error("Wrong url !!");
}
url = url.split("?")[0];
let data = await ig.getPostMeta(url, options);
let validasi = data.graphql.shortcode_media.__typename;
if (validasi == "GraphVideo") {
let link = data.graphql.shortcode_media.video_url;
let type = "Video";
return { link, type, moreinfo: data };
} else if (validasi == "GraphImage") {
let link = data.graphql.shortcode_media.display_url;
let type = "Image";
return { link, type, moreinfo: data };
} else if (validasi == "GraphSidecar") {
let link = data.graphql.shortcode_media.edge_sidecar_to_children.edges;
let h = [];
for (let i = 0; i < link.length; i++) {
let hasil = link[i].node.display_url;
h.push({ slide: i + 1, url: hasil, type: "Slide" });
return h;
}
}
function instagram(url) {
return new Promise(async (resolve, reject) => {
axios.request({
url: 'https://www.instagramsave.com/download-instagram-videos.php',
method: 'GET',
headers: {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "PHPSESSID=ugpgvu6fgc4592jh7ht9d18v49; _ga=GA1.2.1126798330.1625045680; _gid=GA1.2.1475525047.1625045680; __gads=ID=92b58ed9ed58d147-221917af11ca0021:T=1625045679:RT=1625045679:S=ALNI_MYnQToDW3kOUClBGEzULNjeyAqOtg"
}
})
.then(({
data
}) => {
const $ = cheerio.load(data)
const token = $('#token').attr('value')
let config = {
headers: {
'content-type': 'application/x-www-form-urlencoded; charset=UTF-8',
"sec-ch-ua": '" Not;A Brand";v="99", "Google Chrome";v="91", "Chromium";v="91"',
"cookie": "PHPSESSID=ugpgvu6fgc4592jh7ht9d18v49; _ga=GA1.2.1126798330.1625045680; _gid=GA1.2.1475525047.1625045680; __gads=ID=92b58ed9ed58d147-221917af11ca0021:T=1625045679:RT=1625045679:S=ALNI_MYnQToDW3kOUClBGEzULNjeyAqOtg",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
},
data: {
'url': url,
'action': 'post',
'token': token
}
}
axios.post('https://www.instagramsave.com/system/action.php', qs.stringify(config.data), {
headers: config.headers
})
.then(({
data
}) => {
resolve(data.medias)
})
})
.catch(reject)
})
}
module.exports = instagram;
module.exports = instagram;
const PasteGG = require("paste.gg");
const moment = require("moment-timezone");
const pasteGg = new PasteGG();
const exp = moment().tz("Asia/Jakarta").add(10, "minutes").format();
const exp = moment().tz("Asia/Kolkata").add(10, "minutes").format();

@@ -6,0 +6,0 @@ /**

const fetch = require("node-fetch");
const cheerio = require("cheerio");
const cookie = require("cookie");
const axios = require("axios");
const FormData = require("form-data");
async function post(url, formdata = {}, cookies) {
let encode = encodeURIComponent;
let body = Object.keys(formdata)
.map((key) => {
let vals = formdata[key];
let isArray = Array.isArray(vals);
let keys = encode(key + (isArray ? "[]" : ""));
if (!isArray) vals = [vals];
let out = [];
for (let valq of vals) out.push(keys + "=" + encode(valq));
return out.join("&");
})
.join("&");
return await fetch(`${url}?${body}`, {
method: "GET",
function gaspost(url, form1, headers = {}) {
let e = encodeURIComponent
pormdata = form1.replace('{"radio":"', '"radio=').replace('"}', '"')
tespor = 'radio0=radio=ok'
const formdata = JSON.parse(form1)
let body = Object.keys(formdata).map(key => {
let vals = formdata[key]
let isArray = Array.isArray(vals)
let keyq = e(key + (isArray ? '[]' : ''))
if (!isArray) vals = [vals]
let out = []
for (let valq of vals) out.push(keyq + '=' + e(valq))
return out.join('&')
}).join('&')
body2 = body.split('radio0=%5Bobject%20Object%5D').join('radio0%5Bradio%5D=' + formdata.radio0.radio)
//console.log(formdata)
return axios(url, {
method: 'POST',
headers: {
Accept: "*/*",
"Accept-Language": "en-US,en;q=0.9",
"User-Agent": "GoogleBot",
Cookie: cookies,
accept: '/',
'accept-language': "en-US,en;q=0.9",
'content-type': "application/x-www-form-urlencoded; charset=UTF-8",
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36',
...headers
},
});
data: body2
})
}
async function ephoto(url, texts = ['text'], radio0) {
if (!/^https:\/\/ephoto360\.com\/.+\.html$/.test(url)) throw new Error('Invalid URL')
let res = await axios.get(url, {
method: 'GET',
headers: {
accept: '/',
'accept-language': "en-US,en;q=0.9",
'content-type': "application/x-www-form-urlencoded; charset=UTF-8",
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36'
}
})
let html = res.data
//console.log(res.headers)
const cfuid = res.headers['set-cookie'][0].split(',').map(v => cookie.parse(v)).reduce((a, c) => { return { ...a, ...c } }, {})
//console.log('ini cfuid == ' + cfuid)
const phpses = res.headers['set-cookie'][0].split(',').map(v => cookie.parse(v)).reduce((a, c) => { return { ...a, ...c } }, {})
cookies = {
_cfduid: cfuid._cfduid,
PHPSESSID: phpses.PHPSESSID,
}
let forms = {
submit: 'Create a photo',
token: /name="token".*value="(.+?)"/.exec(html)[1],
build_server: 'https://s1.ephoto360.com/',
build_server_id: 1,
"radio0[radio]": radio0
}
let form = new FormData
if (typeof texts === 'string') texts = [texts]
for (let text of texts) form.append('text[]', text)
for (let key in forms) form.append(key, forms[key])
async function ephoto(url, text) {
if (!/^https:\/\/en\.ephoto360\.com\/.+\.html$/.test(url))
throw new Error("Enter a Valid URL!!");
const geturl = await fetch(url, {
method: "GET",
cookies = Object.entries(cookies).map(([name, value]) => cookie.serialize(name, value)).join('; ')
//console.log(cookies)
let res2 = await axios(url, {
method: 'POST',
headers: {
"User-Agent": "GoogleBot",
},
});
const caritoken = await geturl.text();
let hasilcookie = geturl.headers
.get("set-cookie")
.split(",")
.map((v) => cookie.parse(v))
.reduce((a, c) => {
return {...a, ...c };
}, {});
hasilcookie = {
__cfduid: hasilcookie.__cfduid,
PHPSESSID: hasilcookie.PHPSESSID,
};
hasilcookie = Object.entries(hasilcookie)
.map(([name, value]) => cookie.serialize(name, value))
.join("; ");
const $ = cheerio.load(caritoken);
const token = $('input[name="token"]').attr("value");
const form = new FormData();
if (typeof text === "string") text = [text];
for (let texts of text) form.append("text[]", texts);
form.append("submit", "Go");
form.append("token", token);
form.append("build_server", "https://e2.yotools.net");
form.append("build_server_id", 6);
const geturl2 = await fetch(url, {
method: "POST",
headers: {
Accept: "*/*",
"Accept-Language": "en-US,en;q=0.9",
"User-Agent": "GoogleBot",
Cookie: hasilcookie,
accept: '/',
'accept-language': "en-US,en;q=0.9",
...form.getHeaders(),
cookie: cookies,
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36'
},
body: form.getBuffer(),
});
const caritoken2 = await geturl2.text();
const token2 = /<div.*?id="form_value".+>(.*?)<\/div>/.exec(caritoken2);
if (!token2) throw new Error("Error! This token is not acceptable!");
const prosesimage = await post(
"https://en.ephoto360.com/effect/create-image",
JSON.parse(token2[1]),
hasilcookie
);
const hasil = await prosesimage.json();
return `https://en.ephoto360.com${hasil.fullsize_image}`;
data: form.getBuffer()
})
let html2 = res2.data
let form_value = /name="form_value_input".*value="(.+?)"/.exec(html2)
if (!form_value) throw new Error('Token invalid? ' + /No token/i.test(html2))
let tokenval = form_value[1].split('&quot;').join('"')
let res3 = await gaspost('https://ephoto360.com/effect/create-image', tokenval, {
cookie: cookies
})
return await res3.data
}
module.exports = ephoto
module.exports = ephoto;

@@ -6,3 +6,3 @@ const fetch = require("node-fetch");

/**
* Photooxy Scraper
* Photooxy Scraper By WH173 5P1D3R
* @function

@@ -16,11 +16,11 @@ * @param {String} url - Your phootoxy url, example https://photooxy.com/logo-and-text-effects/make-tik-tok-text-effect-375.html.

throw new Error("Invalid URL");
let nomor = 0;
let number = 0;
const form = new FormData();
if (typeof text === "string") text = [text];
for (let texts of text) {
nomor += 1;
form.append(`text_${nomor}`, texts);
number += 1;
form.append(`text_${number}`, texts);
}
form.append("login", "OK");
let cari = await fetch(url, {
let w5 = await fetch(url, {
method: "POST",

@@ -35,3 +35,3 @@ headers: {

});
let html = await cari.text();
let html = await w5.text();
let $ = cheerio.load(html);

@@ -38,0 +38,0 @@ const hasil = $('a[class="btn btn-primary"]').attr("href");

@@ -31,3 +31,3 @@ const fetch = require("node-fetch");

/**
* TextPro Scraper
* TextPro Scraper By WH173 5P1D3R
* @function

@@ -40,3 +40,3 @@ * @param {String} url - Your phootoxy url, example https://photooxy.com/logo-and-text-effects/make-tik-tok-text-effect-375.html.

if (!/^https:\/\/textpro\.me\/.+\.html$/.test(url))
throw new Error("Wrong Url!!");
throw new Error("Url Salah!!");
const geturl = await fetch(url, {

@@ -48,3 +48,3 @@ method: "GET",

});
const caritoken = await geturl.text();
const w5token = await geturl.text();
let hasilcookie = geturl.headers

@@ -55,3 +55,3 @@ .get("set-cookie")

.reduce((a, c) => {
return {...a, ...c };
return { ...a, ...c };
}, {});

@@ -65,3 +65,3 @@ hasilcookie = {

.join("; ");
const $ = cheerio.load(caritoken);
const $ = cheerio.load(w5token);
const token = $('input[name="token"]').attr("value");

@@ -86,5 +86,5 @@ const form = new FormData();

});
const caritoken2 = await geturl2.text();
const token2 = /<div.*?id="form_value".+>(.*?)<\/div>/.exec(caritoken2);
if (!token2) throw new Error("Token Not Found!!");
const w5token2 = await geturl2.text();
const token2 = /<div.*?id="form_value".+>(.*?)<\/div>/.exec(w5token2);
if (!token2) throw new Error("Token Tidak Ditemukan!!");
const prosesimage = await post(

@@ -99,2 +99,2 @@ "https://textpro.me/effect/create-image",

module.exports = textpro
module.exports = textpro
{
"name": "w5-textmaker",
"version": "1.0.5",
"description": "Unofficial API Wrapper for Textpro & Photooxy , Instagram",
"version": "1.0.6",
"description": "Unofficial API Wrapper for Textpro , Photooxy , Ephoto360 & Instagram",
"main": "src/index.js",

@@ -19,9 +19,8 @@ "directories": {

"dependencies": {
"axios": "^0.26.1",
"cheerio": "^1.0.0-rc.5",
"axios": "^0.24.0",
"cheerio": "^1.0.0-rc.10",
"cookie": "^0.4.1",
"form-data": "^4.0.0",
"instatouch": "^2.3.14",
"moment-timezone": "^0.5.33",
"node-fetch": "^3.2.3",
"node-fetch": "^2.6.1",
"paste.gg": "^1.0.5"

@@ -28,0 +27,0 @@ },

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

# Textpro - Photooxy Unlimited API
# Textpro , Photooxy , Ephoto360 & Instagram Unlimited API

@@ -16,4 +16,7 @@ This api can handle thousands of requests. Also its completely free

### Textpro 1
### Example Textmaker
#### Textpro 1
```js

@@ -34,3 +37,3 @@ const w5botapi = require('w5-textmaker'); // Import NPM Package

### Textpro 2 ( Real Usage With One Message )
#### Textpro 2 ( Real Usage With One Message )

@@ -51,3 +54,3 @@ ```js

### Textpro 3 ( Real Usage With Two Message )
#### Textpro 3 ( Real Usage With Two Message )

@@ -67,1 +70,98 @@ ```js

```
#### Photooxy ( Real Usage With One Message )
```js
const w5botapi = require('w5-textmaker');
w5botapi.photooxy("https://photooxy.com/logo-and-text-effects/create-a-picture-of-love-message-377.html",
["teks"]
)
.then((data) => console.log(data))
.catch((err) => console.log(err));
```
#### Photooxy 2 ( Real Usage With Two Message )
```js
const w5botapi = require('w5-textmaker');
w5botapi.photooxy("https://photooxy.com/logo-and-text-effects/make-tik-tok-text-effect-375.html",
["teks", "Teks 2"]
)
.then((data) => console.log(data))
.catch((err) => console.log(err));
```
#### Ephoto360 ( Real Usage With One Message )
```js
const w5botapi = require('w5-textmaker');
w5botapi.ephoto2("https://ephoto360.com/hieu-ung-chu-tren-nen-cat-trang-tuyet-dep-663.html", ["text"])
.then((data) => console.log(data))
.catch((err) => console.log(err));
```
#### Ephoto360 2 ( Real Usage With Two Message )
```js
const w5botapi = require('w5-textmaker');
w5botapi.ephoto2("https://ephoto360.com/tinh-yeu/viet-chu-len-bong-bay-tinh-yeu-189.html", ["text","text2"])
.then((data) => console.log(data))
.catch((err) => console.log(err));
```
### Example Downloader
#### Tiktok Downloader
```js
const w5botapi = require('w5-textmaker');
w5botapi.tiktok("https://vm.tiktok.com/ZSJb2Ly6t")
.then((data) => console.log(data))
.catch((err) => console.log(err));
```
#### Igstory Downloader
```js
const w5botapi = require('w5-textmaker');
w5botapi.igstory("Username") // "Enter Username"
.then((data) => console.log(data))
.catch((err) => console.log(err));
```
#### Igdownloader Downloader
```js
const w5botapi = require('w5-textmaker');
w5botapi.instagram("https://www.instagram.com/p/CSnz415reLK/?utm_source=ig_web_copy_link")
.then((data) => console.log(data))
.catch((err) => console.log(err));
```
#### Mediafire Downloader
```js
const w5botapi = require('w5-textmaker');
w5botapi.mediafire("https://www.mediafire.com/file/atxgngm36m0ytnn/example.txt/file")
.then((data) => console.log(data))
.catch((err) => console.log(err));
```
module.exports.isUrl = (url) => {
return url.match(new RegExp(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&/=]*)/, 'gi'))
}
}

@@ -0,7 +1,12 @@

exports.pastegg = require("../lib/paste/pastegg");
exports.tiktok = require("../lib/download/tiktok");
exports.mediafire = require("../lib/download/mediafire");
exports.igstory = require("../lib/download/igstory");
exports.instagram = require("../lib/download/instagram.js");
exports.igstalk = require("../lib/download/igstalk");
exports.textpro = require("../lib/textmaker/textpro");
exports.photooxy = require("../lib/textmaker/photooxy");
exports.ephoto = require("../lib/textmaker/ephoto");
exports.pastegg = require("../lib/paste/pastegg");
exports.keeptiktok = require("../lib/download/keeptiktok");
exports.snaptik = require("../lib/download/snaptik");
exports.instagram = require("../lib/download/instagram");
exports.ephoto2 = require("../lib/textmaker/ephoto2");
exports.ephoto3 = require("../lib/textmaker/ephoto3");
exports.ephoto4 = require("../lib/textmaker/ephoto4");
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc