diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/processor.php | 8 |
1 files changed, 3 insertions, 5 deletions
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"; |