function getRedirectUrl is not forking for me
rusmix opened this issue · comments
Ruslan commented
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
Naufal Taufiq Ridwan commented
please re-clone this repository, if you are still experiencing the same problem, please comment again