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 /tools | |
parent | 90a40d1a07a9c6401ad4beaadfd1df91e7c82318 (diff) | |
download | ytlibre-030a3e99eba72dfd071697167a14bfe798dd2b74.tar.lz ytlibre-030a3e99eba72dfd071697167a14bfe798dd2b74.tar.xz ytlibre-030a3e99eba72dfd071697167a14bfe798dd2b74.zip |
remove view_count, now not found
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"; |