Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lolikillers/youtubedownloader

Extract thumbnails, videos, audios, subtitles from YT clips
https://github.com/lolikillers/youtubedownloader

Last synced: 20 days ago
JSON representation

Extract thumbnails, videos, audios, subtitles from YT clips

Awesome Lists containing this project

README

        

# YouTubeDownloader
Get video source with preview image from YouTube

Install via Composer
```
composer require lolikillers/youtube-downloader
```

You have two options of how to use this package

1. Use it standalone

```php
fetchResource(URL::fromString('https://www.youtube.com/watch?v=zIwLWfaAg-8'));

print_r($res->toArray());
//
```

2. Use it with RublixDownloader.
Useful in case if your application is willing to download files from different sources (i.e. has more than one download handler)

```php
addHandler(new YouTubeHandler(HttpClient::create()));

$YouTubePageUrl = URL::fromString('https://www.youtube.com/watch?v=zIwLWfaAg-8');

$video = $rublixDownloader->fetchResource($YouTubePageUrl);
print_r($video->toArray());
```

[loli.loveslife.biz](https://api.loli.loveslife.biz)