Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //ttdl skrep, by wolep
- //base https://www.tikwm.com/
- const ttdl = async (tturl) => {
- const r = await fetch("https://www.tikwm.com/api/", {
- "headers": {
- "accept": "application/json, text/javascript, */*; q=0.01",
- "accept-encoding": "gzip, deflate, br, zstd",
- "content-type": "application/x-www-form-urlencoded; charset=UTF-8",
- "x-requested-with": "XMLHttpRequest"
- },
- "body": "url=" + encodeURIComponent(tturl),
- "method": "POST",
- })
- if (!r.ok) throw Error(`${r.status} ${r.statusText} on ${new URL(r).hostname}`)
- const j = await r.json()
- return j
- }
- // cara pakai
- ttdl('https://www.tiktok.com/@dibdiby/video/7599276125746892053')
- .then(console.log)
- .catch(console.log)
Advertisement