rudloff/alltube-library

This package is abandoned and no longer maintained. No replacement package was suggested.

PHP wrapper for youtube-dl

0.1.3 2021-05-13 10:37 UTC

This package is auto-updated.

Last update: 2023-04-22 21:28:02 UTC


README

This library lets you extract a video URL from a webpage by providing a wrapper for youtube-dl.

It is primarily used by AllTube Download.

You can install it with:

composer require rudloff/alltube-library

You can then use it in your PHP code:

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();

You can also have a look at this example project.