Applied a fix on parser

Based on the source code update, the parser is updated accordingly.
This commit is contained in:
Tufayel Ahmed 2020-10-23 16:01:48 +06:00 committed by GitHub
parent ae19601f46
commit cd36ec8849
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -189,12 +189,12 @@ 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('video":{"urls":["', $resp); $check = explode('"playAddr":"', $resp);
if (count($check) > 1){ if (count($check) > 1){
$contentURL = explode("\"",$check[1])[0]; $contentURL = explode("\"",$check[1])[0];
$thumb = explode("\"",explode('og:image" content="', $resp)[1])[0]; $thumb = explode("\"",explode('og:image" content="', $resp)[1])[0];
$username = explode('/',explode('"$pageUrl":"/@', $resp)[1])[0]; $username = explode('/',explode('"$pageUrl":"/@', $resp)[1])[0];
$create_time = explode('"', explode('"createTime":"', $resp)[1])[0]; $create_time = explode(',', explode('"createTime":', $resp)[1])[0];
$dt = new DateTime("@$create_time"); $dt = new DateTime("@$create_time");
$create_time = $dt->format("d M Y H:i:s A"); $create_time = $dt->format("d M Y H:i:s A");
$videoKey = getKey($contentURL); $videoKey = getKey($contentURL);