From 83fc9a7eba479cb36dfb7c1b17ffc762a24d160d Mon Sep 17 00:00:00 2001 From: Tufayel Ahmed <39314838+TufayelLUS@users.noreply.github.com> Date: Sun, 26 Jul 2020 11:15:36 +0600 Subject: [PATCH] Applied a fix on download URL parser Due to the website update, the parsing code is now adjusted to match the changes. --- index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.php b/index.php index 3aa87bc..d32fee8 100644 --- a/index.php +++ b/index.php @@ -125,11 +125,11 @@ function getContent($url, $geturl = false) $url = trim($_POST['tiktok-url']); $resp = getContent($url); //echo "$resp"; - $check = explode("\"contentUrl\":\"", $resp); + $check = explode('video":{"urls":["', $resp); if (count($check) > 1){ $contentURL = explode("\"",$check[1])[0]; - $thumb = explode("\"",explode("\"thumbnailUrl\":[\"", $resp)[1])[0]; - $username = explode("/",explode("@",explode("\"",explode("\"url\":\"", $resp)[1])[0])[1])[0]; + $thumb = explode("\"",explode('og:image" content="', $resp)[1])[0]; + $username = explode("/",explode("@",explode("\"",explode("\"canonicalHref\":\"", $resp)[1])[0])[1])[0]; $videoKey = getKey($contentURL); $cleanVideo = "https://api.tiktokv.com/aweme/v1/playwm/?video_id=$videoKey"; $cleanVideo = getContent($cleanVideo, true);