From 150904668049ee5153fbe20066304bdca44e3eaa Mon Sep 17 00:00:00 2001 From: wukko Date: Thu, 28 Jul 2022 22:20:18 +0600 Subject: [PATCH] tiktok is back! (fix) - added support for tiktok (images won't work, they're only accessible through the app) - hopefully main input bar is now not rounded on ios, i fucking hate apple - if service is not supported, a correlating error will appear, not generic one - removed duplicates from config that are present in package json already - tiny bit of clean up - fixed weird redirect issue that broke downloads from some tiktok share links --- src/modules/services/tiktok.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules/services/tiktok.js b/src/modules/services/tiktok.js index 427b0f7..20e38b6 100644 --- a/src/modules/services/tiktok.js +++ b/src/modules/services/tiktok.js @@ -11,7 +11,11 @@ export default async function(obj) { return { error: loc(obj.lang, 'ErrorCantConnectToServiceAPI', 'tiktok') }; }); html = html.body - obj.postId = html.split('video/')[1].split('?')[0] + if (!html.includes('')) { + obj.postId = html.split('video/')[1].split('?')[0] + } else { + obj.postId = html.split('aweme/detail/')[1].split('?')[0] + } } let url = `https://tiktok.com/@video/video/${obj.postId}` let html = await got.get(url, { headers: { "user-agent": genericUserAgent } });