Looking to hire Laravel developers? Try LaraJobs

laravel-youtube-downloader maintained by mokhosh

Description
download youtube videos in your laravel applications (for personal and educational purposes of course)
Author
Last update
2024/07/08 12:31 (dev-dependabot/github_actions/dependabot/fetch-metadata-2.2.0)
License
Downloads
86

Comments
comments powered by Disqus

download youtube videos in your laravel applications (for personal and educational purposes of course)

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Installation

You can install the package via composer:

composer require mokhosh/laravel-youtube-downloader

Usage

use Mokhosh\Facades\LaravelYoutubeDownloader;

$videoId = LaravelYoutubeDownloader::getVideoIdFromUrl($youtubeUrl);
$video = LaravelYoutubeDownloader::getYoutubeVideoMeta($videoId);

$formats = $video->streamingData->formats;
$adaptiveFormats = $video->streamingData->adaptiveFormats;

$title = $video->videoDetails->title;
$short_description = $video->videoDetails->shortDescription;
$thumbnails = $video->videoDetails->thumbnail->thumbnails;
$thumbnail = end($thumbnails)->url;
$channel_id = $video->videoDetails->channelId;
$channel_name = $video->videoDetails->author;
$views = $video->videoDetails->viewCount;
$video_duration_in_seconds = $video->videoDetails->lengthSeconds;

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.