Merge branch 'feature/phantomjs' into develop
This commit is contained in:
commit
6aad01ede5
6 changed files with 68 additions and 10 deletions
|
@ -68,6 +68,12 @@ class Config
|
||||||
*/
|
*/
|
||||||
public $avconv = 'vendor/bin/ffmpeg';
|
public $avconv = 'vendor/bin/ffmpeg';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Path to the directory that contains the phantomjs binary.
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $phantomjsDir = 'vendor/bin/';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disable URL rewriting.
|
* Disable URL rewriting.
|
||||||
*
|
*
|
||||||
|
|
|
@ -99,7 +99,7 @@ class VideoDownload
|
||||||
|
|
||||||
$process = $this->getProcess($arguments);
|
$process = $this->getProcess($arguments);
|
||||||
//This is needed by the openload extractor because it runs PhantomJS
|
//This is needed by the openload extractor because it runs PhantomJS
|
||||||
$process->setEnv(['QT_QPA_PLATFORM'=>'offscreen']);
|
$process->setEnv(['QT_QPA_PLATFORM'=>'phantom', 'PATH'=>$this->config->phantomjsDir]);
|
||||||
$process->inheritEnvironmentVariables();
|
$process->inheritEnvironmentVariables();
|
||||||
$process->run();
|
$process->run();
|
||||||
if (!$process->isSuccessful()) {
|
if (!$process->isSuccessful()) {
|
||||||
|
|
|
@ -22,9 +22,10 @@
|
||||||
"squizlabs/php_codesniffer": "~3.2.2",
|
"squizlabs/php_codesniffer": "~3.2.2",
|
||||||
"phpunit/phpunit": "~6.5.2",
|
"phpunit/phpunit": "~6.5.2",
|
||||||
"doctrine/instantiator": "~1.0.0",
|
"doctrine/instantiator": "~1.0.0",
|
||||||
"ffmpeg/ffmpeg": "3.4.1",
|
"ffmpeg/ffmpeg": "~3.4.1",
|
||||||
"rg3/youtube-dl": "2017.12.10",
|
"rg3/youtube-dl": "2018.01.21",
|
||||||
"heroku/heroku-buildpack-php": "*"
|
"heroku/heroku-buildpack-php": "*",
|
||||||
|
"anam/phantomjs-linux-x86-binary": "~2.1.1"
|
||||||
},
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
"paas": {
|
"paas": {
|
||||||
|
@ -38,10 +39,10 @@
|
||||||
"type": "package",
|
"type": "package",
|
||||||
"package": {
|
"package": {
|
||||||
"name": "rg3/youtube-dl",
|
"name": "rg3/youtube-dl",
|
||||||
"version": "2017.12.10",
|
"version": "2018.01.21",
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://github.com/rg3/youtube-dl/archive/2017.12.10.zip"
|
"url": "https://github.com/rg3/youtube-dl/archive/2018.01.21.zip"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
48
composer.lock
generated
48
composer.lock
generated
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "f9b0a5cf05f0e39a11f132701b9a95b4",
|
"content-hash": "4252f8c5d568e5b9854a84da162e621c",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "aura/session",
|
"name": "aura/session",
|
||||||
|
@ -1287,6 +1287,48 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"packages-dev": [
|
"packages-dev": [
|
||||||
|
{
|
||||||
|
"name": "anam/phantomjs-linux-x86-binary",
|
||||||
|
"version": "v2.1.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/anam-hossain/phantomjs-linux-x86-binary.git",
|
||||||
|
"reference": "cb90cd0e7bd4ad34f52e6834783b1c5adae15014"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/anam-hossain/phantomjs-linux-x86-binary/zipball/cb90cd0e7bd4ad34f52e6834783b1c5adae15014",
|
||||||
|
"reference": "cb90cd0e7bd4ad34f52e6834783b1c5adae15014",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"bin": [
|
||||||
|
"bin/phantomjs"
|
||||||
|
],
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Anam\\PhantomLinux\\": "/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"BSD-2-Clause"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Anam hossain",
|
||||||
|
"email": "enam33@gmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "PhantomJS static linked binary for 64 bit linux systems. Most of Linux distributions are supported including Ubuntu, Debian, Fedora and CentOS.",
|
||||||
|
"homepage": "http://phantomjs.org/download.html",
|
||||||
|
"keywords": [
|
||||||
|
"binary",
|
||||||
|
"phantomjs",
|
||||||
|
"phantomjs binary"
|
||||||
|
],
|
||||||
|
"time": "2016-04-05T05:24:48+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "doctrine/instantiator",
|
"name": "doctrine/instantiator",
|
||||||
"version": "1.0.5",
|
"version": "1.0.5",
|
||||||
|
@ -2114,10 +2156,10 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "rg3/youtube-dl",
|
"name": "rg3/youtube-dl",
|
||||||
"version": "2017.12.10",
|
"version": "2018.01.21",
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://github.com/rg3/youtube-dl/archive/2017.12.10.zip",
|
"url": "https://github.com/rg3/youtube-dl/archive/2018.01.21.zip",
|
||||||
"reference": null,
|
"reference": null,
|
||||||
"shasum": null
|
"shasum": null
|
||||||
},
|
},
|
||||||
|
|
|
@ -27,6 +27,9 @@ avconv: vendor/bin/ffmpeg
|
||||||
# avconv/ffmpeg logging level.
|
# avconv/ffmpeg logging level.
|
||||||
avconvVerbosity: error
|
avconvVerbosity: error
|
||||||
|
|
||||||
|
# Path to the directory that contains the phantomjs binary.
|
||||||
|
phantomjsDir: vendor/bin/
|
||||||
|
|
||||||
# True to disable URL rewriting
|
# True to disable URL rewriting
|
||||||
uglyUrls: false
|
uglyUrls: false
|
||||||
|
|
||||||
|
|
|
@ -197,6 +197,12 @@ class VideoDownloadTest extends TestCase
|
||||||
'f4v',
|
'f4v',
|
||||||
'edgefcs.net',
|
'edgefcs.net',
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
'https://openload.co/embed/qTsjMEUtN4U', 'best[protocol^=http]',
|
||||||
|
'aup-the-lego-ninjago-movie-2017-1508463762.MP4.mp4-qTsjMEUtN4U',
|
||||||
|
'mp4',
|
||||||
|
'openload.co'
|
||||||
|
]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -282,7 +288,7 @@ class VideoDownloadTest extends TestCase
|
||||||
$this->assertObjectHasAttribute('ext', $info);
|
$this->assertObjectHasAttribute('ext', $info);
|
||||||
$this->assertObjectHasAttribute('title', $info);
|
$this->assertObjectHasAttribute('title', $info);
|
||||||
$this->assertObjectHasAttribute('extractor_key', $info);
|
$this->assertObjectHasAttribute('extractor_key', $info);
|
||||||
$this->assertObjectHasAttribute('formats', $info);
|
$this->assertObjectHasAttribute('format', $info);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue