rudloff / alltube-library
PHP wrapper for youtube-dl
Installs: 5 729
Dependents: 1
Suggesters: 0
Security: 0
Stars: 11
Watchers: 2
Forks: 2
Open Issues: 3
Requires
- ext-json: *
- guzzlehttp/guzzle: ^6.5
- psr/log: ^1.1
- symfony/process: ^4.0|^5.0
Requires (Dev)
- phpro/grumphp: ^0.18.0
- phpstan/phpstan: ^0.12.29
- roave/security-advisories: dev-master
- squizlabs/php_codesniffer: ^3.5
- symfony/var-dumper: ^5.1
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.