Applied a fix on download URL parser

Due to the website update, the parsing code is now adjusted to match the changes.
This commit is contained in:
Tufayel Ahmed 2020-07-26 11:15:36 +06:00 committed by GitHub
parent b19b3ee6bc
commit 83fc9a7eba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -125,11 +125,11 @@ function getContent($url, $geturl = false)
$url = trim($_POST['tiktok-url']); $url = trim($_POST['tiktok-url']);
$resp = getContent($url); $resp = getContent($url);
//echo "$resp"; //echo "$resp";
$check = explode("\"contentUrl\":\"", $resp); $check = explode('video":{"urls":["', $resp);
if (count($check) > 1){ if (count($check) > 1){
$contentURL = explode("\"",$check[1])[0]; $contentURL = explode("\"",$check[1])[0];
$thumb = explode("\"",explode("\"thumbnailUrl\":[\"", $resp)[1])[0]; $thumb = explode("\"",explode('og:image" content="', $resp)[1])[0];
$username = explode("/",explode("@",explode("\"",explode("\"url\":\"", $resp)[1])[0])[1])[0]; $username = explode("/",explode("@",explode("\"",explode("\"canonicalHref\":\"", $resp)[1])[0])[1])[0];
$videoKey = getKey($contentURL); $videoKey = getKey($contentURL);
$cleanVideo = "https://api.tiktokv.com/aweme/v1/playwm/?video_id=$videoKey"; $cleanVideo = "https://api.tiktokv.com/aweme/v1/playwm/?video_id=$videoKey";
$cleanVideo = getContent($cleanVideo, true); $cleanVideo = getContent($cleanVideo, true);