ahaschool / video-dl
ahaschool download video for php
v1.2
2018-12-16 03:46 UTC
Requires
- php: >=5.4
- guzzlehttp/guzzle: ^6.3
- norkunas/youtube-dl-php: ^1.0
Requires (Dev)
- phpunit/phpunit: ~4.5
This package is auto-updated.
Last update: 2025-03-16 20:56:26 UTC
README
install the wrapper using Composer:
composer require ahaschool/video-dl
Add composer script at your root composer.josn
"scripts": {
...
"post-install-cmd": "chmod +x vendor/ahaschool/video-dl/bin/youtube-dl"
}
Get youtube video url list
<?php require __DIR__ . '/vendor/autoload.php'; use Ahaschool\Videodl\Youtube\Channel; $chl = new Channel('user/byjusclasses/videos'); $items = $chl->initVideoItems()->getItems();
Download youtube video by video key
<?php require __DIR__ . '/vendor/autoload.php'; use Ahaschool\Videodl\Youtube\Download; $dl = new Download('./'); try { $video = $dl->dl('WPOoNZbT-1w'); } catch (\Exception $e) { echo $e->getMessage(); }