atphp / youtube-downloader
Installs: 5 017
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 4
Forks: 472
Open Issues: 2
Requires
- guzzlehttp/guzzle: ~5.0
- psr/log: ~1.0.0
Requires (Dev)
- monolog/monolog: ~1.13.1
This package is auto-updated.
Last update: 2024-12-12 20:43:49 UTC
README
Download it using composer
composer require atphp/youtube-downloader
Use it
use atphp\youtube_downloader\YoutubeDownloader; use Monolog\Handler\ErrorLogHandler; use Monolog\Logger; require_once __DIR__ . '/vendor/autoload.php'; $logger = new Logger('at.youtube-downloader'); $logger->pushHandler(new ErrorLogHandler()); $yd = new YoutubeDownloader(); $yd->setLogger($logger); print_r([ 'downloadURL' => $yd->getDownloadUrl($videoId = 'U839NZ78EOo', $format = 'best') ]);