fix: removing cookie options on tiktok stalk user
This commit is contained in:
parent
c83e329f27
commit
c7af8d53a9
@ -258,7 +258,7 @@ tiktokdl search video <query> -p 1 -proxy "http://your-proxy-url"
|
|||||||
const Tiktok = require("@tobyg74/tiktok-api-dl")
|
const Tiktok = require("@tobyg74/tiktok-api-dl")
|
||||||
|
|
||||||
const username = "Tobz2k19"
|
const username = "Tobz2k19"
|
||||||
Tiktok.Stalker(username, {
|
Tiktok.StalkUser(username, {
|
||||||
proxy: "YOUR_PROXY" // optional
|
proxy: "YOUR_PROXY" // optional
|
||||||
}).then((result) => console.log(result))
|
}).then((result) => console.log(result))
|
||||||
```
|
```
|
||||||
|
|||||||
@ -23,7 +23,6 @@ import { SocksProxyAgent } from "socks-proxy-agent"
|
|||||||
|
|
||||||
export const StalkUser = (
|
export const StalkUser = (
|
||||||
username: string,
|
username: string,
|
||||||
cookie?: string | any[],
|
|
||||||
proxy?: string
|
proxy?: string
|
||||||
): Promise<TiktokStalkUserResponse> =>
|
): Promise<TiktokStalkUserResponse> =>
|
||||||
new Promise(async (resolve) => {
|
new Promise(async (resolve) => {
|
||||||
@ -31,10 +30,6 @@ export const StalkUser = (
|
|||||||
Axios(`${_tiktokurl}/@${username}`, {
|
Axios(`${_tiktokurl}/@${username}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
headers: {
|
headers: {
|
||||||
cookie:
|
|
||||||
typeof cookie === "object"
|
|
||||||
? cookie.map((v: any) => `${v.name}=${v.value}`).join("; ")
|
|
||||||
: cookie,
|
|
||||||
"User-Agent":
|
"User-Agent":
|
||||||
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36"
|
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36"
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user