mokhosh/ laravel-youtube-downloader
在您的Laravel应用程序中下载YouTube视频(当然是为了个人和教育用途)
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-09-08 10:51:29 UTC
README
安装
您可以通过Composer安装此包
composer require mokhosh/laravel-youtube-downloader
使用
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;
测试
composer test
变更日志
有关最近更改的更多信息,请参阅变更日志。
贡献
有关详细信息,请参阅贡献指南。
安全漏洞
有关如何报告安全漏洞的详细信息,请参阅我们的安全策略。
鸣谢
许可
MIT许可(MIT)。有关更多信息,请参阅许可文件。