diff options
author | Jesús <heckyel@hyperbola.info> | 2018-11-13 15:00:38 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2018-11-13 15:00:38 -0500 |
commit | 030a3e99eba72dfd071697167a14bfe798dd2b74 (patch) | |
tree | 79dc65b14c560374f500d6e9f9918c6b98d95137 | |
parent | 90a40d1a07a9c6401ad4beaadfd1df91e7c82318 (diff) | |
download | ytlibre-030a3e99eba72dfd071697167a14bfe798dd2b74.tar.lz ytlibre-030a3e99eba72dfd071697167a14bfe798dd2b74.tar.xz ytlibre-030a3e99eba72dfd071697167a14bfe798dd2b74.zip |
remove view_count, now not found
-rw-r--r-- | index.php | 1 | ||||
-rw-r--r-- | templates/video.tpl | 2 | ||||
-rw-r--r-- | tools/processor.php | 8 |
3 files changed, 3 insertions, 8 deletions
@@ -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"; |