Exemplo n.º 1
0
 /**
  * @test
  * @expectedException \Youtubedl\Exceptions\YoutubedlException
  */
 public function shouldThrowException()
 {
     $this->youtubedl->getOption()->getExtractors();
     $this->youtubedl->execute();
 }
Exemplo n.º 2
0
<?php

require_once __DIR__ . '/../vendor/autoload.php';
use Youtubedl\Youtubedl;
$youtubedl = new Youtubedl();
$youtubedl->getOption()->setOutput("'/tmp/%(title)s.%(ext)s'");
$youtubedl->isVerbose(true)->download('BaW_jenozKc')->getOption()->getListExtractors();
foreach ($youtubedl->execute() as $output) {
    echo "{$output}\n";
}
$youtubedl->getOption()->getExtractorDescriptions();
foreach ($youtubedl->execute() as $output) {
    echo "{$output}\n";
}
$youtubedl->getOption()->setUserAgent('Opera/9.80 (Windows NT 6.0) Presto/2.12.388 Version/12.14')->dumpUserAgent();
foreach ($youtubedl->execute() as $output) {
    echo "{$output}\n";
}
Exemplo n.º 3
0
<?php

require_once __DIR__ . '/../vendor/autoload.php';
use Youtubedl\Youtubedl;
$youtubedl = new Youtubedl();
$youtubedl->getFilesystemOption()->setOutput("\"/tmp/%(title)s.%(ext)s\"");
$youtubedl->download('BaW_jenozKc');
$youtubedl->getOption()->getExtractors();
var_dump($youtubedl->execute());
$youtubedl->getOption()->getExtractorDescriptions();
var_dump($youtubedl->execute());
$youtubedl->getOption()->setUserAgent('Opera/9.80 (Windows NT 6.0) Presto/2.12.388 Version/12.14')->getUserAgent();
var_dump($youtubedl->execute());