mokhosh / laravel-youtube-downloader
download youtube videos in your laravel applications (for personal and educational purposes of course)
v1.0.0
2023-12-10 14:47 UTC
Requires
- php: ^8.1
- illuminate/contracts: ^10.0
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- larastan/larastan: ^2.0.1
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.8
- orchestra/testbench: ^8.8
- pestphp/pest: ^2.20
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
This package is auto-updated.
Last update: 2024-11-08 11:10:05 UTC
README
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.