tiktok-stats
Advanced tools
Comparing version 1.5.1 to 1.6.0
{ | ||
"name": "tiktok-stats", | ||
"version": "1.5.1", | ||
"version": "1.6.0", | ||
"description": "This package gives you the statistics of which user tiktok !", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -33,5 +33,6 @@ # tiktok-stats | ||
"avatar": "https://p77-sign-sg.tiktokcdn.com/aweme/720x720/tos-alisg-avt-0068/f8ca5ba97d27cb3f90c02afc140bc7db.jpeg?x-expires=1605636000&x-signature=0awvFhUVv82Kj%2BZtDEG%2B8WKYAYw%3D", | ||
"description": "Développeur de site web & de bots Discord." | ||
"description": "Développeur de site web & de bots Discord.", | ||
"certified": false | ||
}, | ||
"stats": { "following": 2, "follower": 1, "like": 29 } | ||
"stats": { "following": 2, "follower": 1, "like": 29, "videoCount": 3 } | ||
} | ||
@@ -38,0 +39,0 @@ ``` |
@@ -24,4 +24,4 @@ const puppeteer = require('puppeteer'); | ||
await page.goto(`https://www.tiktok.com/@${this.user}?lang=fr`); | ||
await page.evaluate(async () => { | ||
setTimeout(async () => { | ||
await page.evaluate(async () => { | ||
let profil; | ||
@@ -36,6 +36,8 @@ const number = document.getElementsByClassName("number"); | ||
const likes = number[2].children[0].innerHTML; | ||
const name = document.getElementsByClassName("share-title")[0].innerHTML.replace(/<!-- --> /g, ""); | ||
const certificate = document.getElementsByClassName("share-title")[0].classList[2] ? true : false; | ||
const name = document.getElementsByClassName("share-title")[0].innerText.replace(/ /g, ""); | ||
const subName = document.getElementsByClassName("share-sub-title").innerHTML; | ||
const description = document.getElementsByClassName("share-desc")[0].innerHTML; | ||
const avatar_URL = document.getElementsByClassName("tiktok-avatar")[5].children[0].src; | ||
const videos = document.getElementsByClassName("video-feed-item") ? document.getElementsByClassName("video-feed-item").length : 0; | ||
profil = { | ||
@@ -46,3 +48,4 @@ 'user':{ | ||
'avatar': avatar_URL, | ||
'description': description | ||
'description': description, | ||
'certified': certificate | ||
}, | ||
@@ -52,3 +55,4 @@ 'stats':{ | ||
'follower': abo, | ||
'like': likes | ||
'like': likes, | ||
'videoCount': videos | ||
} | ||
@@ -61,4 +65,5 @@ } | ||
}); | ||
}, 1000) | ||
}); | ||
} | ||
} |
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
4418
66
58