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

tiktok-stats

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tiktok-stats - npm Package Compare versions

Comparing version 1.7.4 to 1.7.5

2

package.json
{
"name": "tiktok-stats",
"version": "1.7.4",
"version": "1.7.5",
"description": "This package gives you the statistics of which user tiktok !",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -6,4 +6,23 @@ const fetch = require('node-fetch');

module.exports = class Greeting {
constructor() {
this.user = "pioupia_dev";
constructor() {
this.traductor = {
"Abonnements": "following",
"Abonnés": "follower",
" J'aime": "like"
};
this.object = {
"user": {
"username": "No username was provided.",
"profilName": this.user,
"avatar": "No avatar was provided.",
"description": "No description provided.",
"certified": false
},
"stats": {
"following": 0,
"follower": 0,
"like": 0
}
};
}

@@ -27,3 +46,3 @@

const res = this.callNumber(data, `<strong title="${response}">`);
object.stats[traductor[response]] = res;
object.stats[this.traductor[response]] = res;
}

@@ -59,24 +78,2 @@

/* Import JSON data */
const object = {
"user": {
"username": "No username was provided.",
"profilName": this.user,
"avatar": "No avatar was provided.",
"description": "No description provided.",
"certified": false
},
"stats": {
"following": 0,
"follower": 0,
"like": 0
}
}
const traductor = {
"Abonnements": "following",
"Abonnés": "follower",
" J'aime": "like"
}
const header = {

@@ -115,9 +112,9 @@ headers: {

certified > -1 ? certified = true : certified = false;
if (certified && certified == true) object.user.certified = true;
if (certified && certified == true) this.object.user.certified = true;
const description = this.callNumber(data, `<h2 class="share-desc mt10">`);
if (description && description != 0) object.user.description = this.entitiesDetect(description);
if (description && description != 0) this.object.user.description = this.entitiesDetect(description);
const userName = this.callNumber(data, `<h1 class="share-sub-title">`);
if (userName && userName != 0) object.user.username = this.entitiesDetect(userName);
if (userName && userName != 0) this.object.user.username = this.entitiesDetect(userName);

@@ -127,3 +124,3 @@ let avatar = data.split(`<span class="tiktok-avatar tiktok-avatar-circle avatar jsx-3659161049" style="cursor:unset;width:116px;height:116px">`);

if (certified && certified == true) {
avatar = avatar[1].split(`<`)[1].replace(`img alt="${object.user.username} TikTok" src="`, "").replace(`"/>`, "").replace(/amp;/g, "");
avatar = avatar[1].split(`<`)[1].replace(`img alt="${this.object.user.username} TikTok" src="`, "").replace(`"/>`, "").replace(/amp;/g, "");
} else {

@@ -133,8 +130,8 @@ avatar = avatar[1].split(`<`)[1].replace(`img alt="" src="`, "").replace(`"/>`, "").replace(/amp;/g, "");

object.user.avatar = avatar;
this.object.user.avatar = avatar;
}
this.pushToArray(object);
this.pushToArray(this.object);
resolve(object);
resolve(this.object);
});

@@ -141,0 +138,0 @@ })

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