From 8f6c46d0895a251bfd16227b326a3caad5d3e341 Mon Sep 17 00:00:00 2001 From: Tufayel Ahmed <39314838+TufayelLUS@users.noreply.github.com> Date: Fri, 14 Jan 2022 20:05:16 +0600 Subject: [PATCH] Updated the code to adjust with new html structure A sudden change in HTML structure caused the script to stop working and changes have been performed to fix the issue, the code is working again. --- index.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/index.php b/index.php index 3cdb313..698c39e 100644 --- a/index.php +++ b/index.php @@ -203,10 +203,11 @@ function getContent($url, $geturl = false) $check = explode('"downloadAddr":"', $resp); if (count($check) > 1){ $contentURL = explode("\"",$check[1])[0]; - $contentURL = str_replace("\\u0026", "&", $contentURL); + $contentURL = str_replace("\\u0026", "&", $contentURL); + $contentURL = str_replace("\\u002F", "/", $contentURL); $thumb = explode("\"",explode('og:image" content="', $resp)[1])[0]; - $username = explode('/',explode('"$pageUrl":"/@', $resp)[1])[0]; - $create_time = explode(',', explode('"createTime":', $resp)[1])[0]; + $username = explode('"',explode('"uniqueId":"', $resp)[1])[0]; + $create_time = explode('"', explode('"createTime":"', $resp)[1])[0]; $dt = new DateTime("@$create_time"); $create_time = $dt->format("d M Y H:i:s A"); $videoKey = getKey($contentURL); @@ -239,7 +240,7 @@ function getContent($url, $geturl = false) });
-

Bot/Scraper Development Services: We-Can-Solve.com
+

Bot/Scraper Development Services: DeveloperHired.com