n0l3r / tiktok-downloader

tiktok downloader is a tool to download video from tiktok with watermark or without watermark. There are two features that is, mass download (by username/urls) and single download (by url).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

function getRedirectUrl is not forking for me

rusmix opened this issue · comments

it was fetching endlessly

i've changed it like this:
const getRedirectUrl = async (url) => {
if(url.includes("vm.tiktok.com") || url.includes("vt.tiktok.com")) {
url = await fetch(url, {
redirect: 'manual',
follow: 30,
})
const body = await url.text()

console.log(chalk.green('[*] Redirecting to: ' + url))
return body
}
return url;

}

the code above works. pls check if this is a global bug tiktok. hope i helped someone

please re-clone this repository, if you are still experiencing the same problem, please comment again