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).
MIT License
332 stars 135 forks source link

function getRedirectUrl is not forking for me #14

Open rusmix opened 1 year ago

rusmix commented 1 year ago

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

n0l3r commented 1 year ago

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