aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--index.php1
-rw-r--r--templates/video.tpl2
-rw-r--r--tools/processor.php8
3 files changed, 3 insertions, 8 deletions
diff --git a/index.php b/index.php
index f9f3d4e..b8ae22e 100644
--- a/index.php
+++ b/index.php
@@ -26,7 +26,6 @@ if (empty($_GET['link'])){
$video_decode->assign("videoThumbURL", $videoThumbURL);
$video_decode->assign("videoAuthor", $videoAuthor);
$video_decode->assign("videoDuration", $videoDuration);
- $video_decode->assign("videoViews", $videoViews);
$video_decode->assign("librethumb", $librethumb);
$video_decode->assign("cStreams", $cStreams);
diff --git a/templates/video.tpl b/templates/video.tpl
index aa0635b..feac303 100644
--- a/templates/video.tpl
+++ b/templates/video.tpl
@@ -39,8 +39,6 @@
<h6>{$videoAuthor}</h6>
<h6 class="yt-titulo">Duración</h6>
<h6>{$videoDuration}</h6>
- <h6 class="yt-titulo">Vistas</h6>
- <h6>{$videoViews}</h6>
</div>
</div>
</div>
diff --git a/tools/processor.php b/tools/processor.php
index 26b24a4..58a8bc7 100644
--- a/tools/processor.php
+++ b/tools/processor.php
@@ -18,10 +18,8 @@ if (strpos($baselink,$yturl) !== false){
parse_str($link, $urlData);
$my_id = array_values($urlData)[0];
-$videoFetchURL = "https://www.youtube.com/get_video_info?&video_id=" . $my_id . "&asv=3&el=detailpage&hl=en_US";
-$videoData = get($videoFetchURL);
-
-parse_str($videoData, $video_info);
+$videoFetchURL = file_get_contents('https://www.youtube.com/get_video_info?html5=1&video_id='.$my_id);
+parse_str($videoFetchURL, $video_info);
$video_info = json_decode(json_encode($video_info));
if (!$video_info->status === "ok") {
@@ -31,7 +29,7 @@ $videoTitle = $video_info->title;
$videoAuthor = $video_info->author;
$videoDurationSecs = $video_info->length_seconds;
$videoDuration = secToDuration($videoDurationSecs);
-$videoViews = $video_info->view_count;
+//$videoViews = $video_info->view_count;
//change hqdefault.jpg to default.jpg for downgrading the thumbnail quality
$videoThumbURL = "https://i1.ytimg.com/vi/{$my_id}/hqdefault.jpg";