alltube-library/README.md

27 lines
632 B
Markdown
Raw Normal View History

2020-06-21 13:21:06 +02:00
# AllTube library
This library lets you extract a video URL from a webpage
by providing a wrapper
for [youtube-dl](https://ytdl-org.github.io/youtube-dl/index.html).
2025-05-01 11:57:40 +02:00
It is primarily used by [AllTube Download](https://code.ehwurscht.at/genuineparts/alltube).
2020-06-21 13:21:06 +02:00
You can install it with:
```bash
2025-05-01 11:57:40 +02:00
composer require genuineparts/alltube-library
2020-06-21 13:21:06 +02:00
```
You can then use it in your PHP code:
```php
use Alltube\Library\Downloader;
require_once __DIR__.'/vendor/autoload.php';
$downloader = new Downloader('/usr/local/bin/youtube-dl');
$video = $downloader->getVideo('https://www.youtube.com/watch?v=dQw4w9WgXcQ');
$video->getUrl();
```