docs: add tiktok search user
This commit is contained in:
parent
585158817c
commit
4a816a842e
87
README.md
87
README.md
@ -25,6 +25,7 @@
|
|||||||
- [From Github](#from-github)
|
- [From Github](#from-github)
|
||||||
- [Examples](#examples)
|
- [Examples](#examples)
|
||||||
- [Tiktok Downloader](#tiktok-downloader)
|
- [Tiktok Downloader](#tiktok-downloader)
|
||||||
|
- [Tiktok Search](#tiktok-search)
|
||||||
- [Tiktok Stalker](#tiktok-stalker)
|
- [Tiktok Stalker](#tiktok-stalker)
|
||||||
- [Response](#response)
|
- [Response](#response)
|
||||||
- [Contributors](#contributors)
|
- [Contributors](#contributors)
|
||||||
@ -78,39 +79,46 @@ npm install github:TobyG74/tiktok-api-dl
|
|||||||
- V3 uses the API from [MusicalDown](https://musicaldown.com/)
|
- V3 uses the API from [MusicalDown](https://musicaldown.com/)
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const { TiktokDownloader } = require("@tobyg74/tiktok-api-dl")
|
const { default: Tiktok } = require("@tobyg74/tiktok-api-dl")
|
||||||
|
|
||||||
const tiktok_url = "https://vt.tiktok.com/ZS84BnrU9"
|
const tiktok_url = "https://vt.tiktok.com/ZS84BnrU9"
|
||||||
|
|
||||||
TiktokDownloader(tiktok_url, {
|
Tiktok.Downloader(tiktok_url, {
|
||||||
version: "v1" // version: "v1" | "v2" | "v3"
|
version: "v1" // version: "v1" | "v2" | "v3"
|
||||||
}).then((result) => {
|
}).then((result) => {
|
||||||
console.log(result)
|
console.log(result)
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Tiktok Search
|
||||||
|
|
||||||
|
### Search User
|
||||||
|
|
||||||
|
- Using Your Cookie
|
||||||
|
|
||||||
|
```js
|
||||||
|
const { default: Tiktok } = require("@tobyg74/tiktok-api-dl")
|
||||||
|
|
||||||
|
const username = "tobz2k19"
|
||||||
|
|
||||||
|
Tiktok.Search(username, {
|
||||||
|
type: "user",
|
||||||
|
cookie: process.env.COOKIE || "Your Cookie"
|
||||||
|
}).then((result) => {
|
||||||
|
console.log(result)
|
||||||
|
})
|
||||||
|
```
|
||||||
|
|
||||||
## Tiktok Stalker
|
## Tiktok Stalker
|
||||||
|
|
||||||
- Using Default Cookies
|
- Using Your Cookie
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const { TiktokStalk } = require("@tobyg74/tiktok-api-dl")
|
const { default: Tiktok } = require("@tobyg74/tiktok-api-dl")
|
||||||
|
|
||||||
const username = "tobz2k19"
|
const username = "tobz2k19"
|
||||||
|
|
||||||
TiktokStalk(username).then((result) => {
|
Tiktok.StalkUser(username, {
|
||||||
console.log(result)
|
|
||||||
})
|
|
||||||
```
|
|
||||||
|
|
||||||
- Using Your Cookies
|
|
||||||
|
|
||||||
```js
|
|
||||||
const { TiktokStalk } = require("@tobyg74/tiktok-api-dl")
|
|
||||||
|
|
||||||
const username = "tobz2k19"
|
|
||||||
|
|
||||||
TiktokStalk(username, {
|
|
||||||
cookie: process.env.COOKIE || "Your Cookie"
|
cookie: process.env.COOKIE || "Your Cookie"
|
||||||
}).then((result) => {
|
}).then((result) => {
|
||||||
console.log(result)
|
console.log(result)
|
||||||
@ -133,7 +141,7 @@ TiktokStalk(username, {
|
|||||||
id: string
|
id: string
|
||||||
createTime: number
|
createTime: number
|
||||||
description: string
|
description: string
|
||||||
duration?: string
|
isADS: boolean
|
||||||
hashtag: string[]
|
hashtag: string[]
|
||||||
author: {
|
author: {
|
||||||
uid: string
|
uid: string
|
||||||
@ -151,17 +159,24 @@ TiktokStalk(username, {
|
|||||||
downloadCount: number
|
downloadCount: number
|
||||||
shareCount: number
|
shareCount: number
|
||||||
commentCount: number
|
commentCount: number
|
||||||
likeCount: number
|
diggCount: number
|
||||||
favoriteCount: number
|
favoriteCount: number
|
||||||
forwardCount: number
|
forwardCount: number
|
||||||
whatsappShareCount: number
|
whatsappShareCount: number
|
||||||
loseCount: number
|
loseCount: number
|
||||||
loseCommentCount: number
|
loseCommentCount: number
|
||||||
|
whatsappShareCount: number
|
||||||
|
repostCount: number
|
||||||
|
}
|
||||||
|
video?: {
|
||||||
|
ratio: string
|
||||||
|
duration: number
|
||||||
|
playAddr: string
|
||||||
|
downloadAddr: string
|
||||||
|
cover: string
|
||||||
|
originCover: string
|
||||||
|
dynamicCover: string
|
||||||
}
|
}
|
||||||
video?: string[]
|
|
||||||
cover?: string[]
|
|
||||||
dynamicCover?: string[]
|
|
||||||
originCover: string[]
|
|
||||||
images?: string[]
|
images?: string[]
|
||||||
music: {
|
music: {
|
||||||
id: number
|
id: number
|
||||||
@ -173,6 +188,9 @@ TiktokStalk(username, {
|
|||||||
coverMedium: string[]
|
coverMedium: string[]
|
||||||
coverThumb: string[]
|
coverThumb: string[]
|
||||||
duration: number
|
duration: number
|
||||||
|
isCommerceMusic: boolean
|
||||||
|
isOriginalSound: boolean
|
||||||
|
isAuthorArtist: boolean
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -232,6 +250,28 @@ TiktokStalk(username, {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><b>Tiktok Search "User"</b></summary>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
```ts
|
||||||
|
{
|
||||||
|
status: "success" | "error"
|
||||||
|
message?: string
|
||||||
|
result?: {
|
||||||
|
uid: string
|
||||||
|
username: string
|
||||||
|
nickname: string
|
||||||
|
signature: string
|
||||||
|
followerCount: number
|
||||||
|
avatarThumb: string[]
|
||||||
|
isVerified: boolean
|
||||||
|
secUid: string
|
||||||
|
url: string
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
<details>
|
<details>
|
||||||
<summary><b>Tiktok Stalker</b></summary>
|
<summary><b>Tiktok Stalker</b></summary>
|
||||||
@ -257,6 +297,7 @@ TiktokStalk(username, {
|
|||||||
videoCount: number
|
videoCount: number
|
||||||
likeCount: number
|
likeCount: number
|
||||||
}
|
}
|
||||||
|
posts: Posts[]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user