mail2bapi/youtube-downloader 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mail2bapi/youtube-downloader

Composer 安装命令:

composer require mail2bapi/youtube-downloader

包简介

PHP library for downloading YouTube videos

README 文档

README

A PHP library for downloading videos from YouTube without API key.

Requirements

  • PHP 7.2 or higher

Installation

Run in console below command to download package to your project:

composer mail2bapi/youtube-downloader

Usage

use Mail2bapi\YouTubeDownloader\YoutubeDownloader;

// Yourtube URL
$yourtubeVideoUrl = '<youtube.com video URL>';

// New YoutubeDownloader instance
$yt = new YoutubeDownloader();

// Enabling logging
$yt->setLogging(true);

// Setting location for saving videos and thumbnails. By default is saves in directory 'videos/'
$yt->setDownloadFolder('<my/location>');

// Collect Video ID from URL
$videoId = $yt->getVideoId($yourtubeVideoUrl);

// Get Video details of a Yourtube video
$videos = $yt->getVideoDetail($yourtubeVideoUrl);

// $videos array have following keys 
// 'video_id', 'channel_id', 'duration', 'title', 'description', 'keywords', 'average_rating', 'allow_ratings', 'view_count', 'author', 'video', 'embed_video', 'adaptive_formats', 'formats', 'thumbnails'

// Get array of all video qualities
$videoQualities = $yt->getVideoQualities();

// Download all Thumbnail images
$yt->downloadThumbnails($videos);

// Download all videos as per video qualities available for the video
$yt->downloadVideo();

// Download single videos as per video qualities available for the video
$yt->downloadAVideo($videos['formats']['360p']['link'], $videos['video_id'], $videoQualities[0]);

Enjoyed using the library. Please help to improve it by report issues and suggesting improvements. Thank you!

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-10-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固