mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-09-02 19:28:55 +00:00
Update adult movies, replace simple_html_dom with voku/simple_html_dom
This commit is contained in:
@@ -52,9 +52,12 @@ class ADE extends AdultMovies
|
||||
protected $_tmpResponse;
|
||||
protected $_ch;
|
||||
|
||||
public function __construct(array $options = [])
|
||||
/**
|
||||
* ADE constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct($options);
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -206,7 +209,7 @@ class ADE extends AdultMovies
|
||||
$title = $ret->title;
|
||||
$title = str_replace('/XXX/', '', $title);
|
||||
$title = preg_replace('/\(.*?\)|[-._]/', ' ', $title);
|
||||
$url = (string) trim($ret->href);
|
||||
$url = trim($ret->href);
|
||||
similar_text(strtolower($movie), strtolower($title), $p);
|
||||
if ($p >= 90) {
|
||||
$this->_directUrl = self::ADE.$url;
|
||||
@@ -218,7 +221,6 @@ class ADE extends AdultMovies
|
||||
|
||||
return true;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -62,9 +62,12 @@ class ADM extends AdultMovies
|
||||
*/
|
||||
protected $_title = '';
|
||||
|
||||
public function __construct(array $options = [])
|
||||
/**
|
||||
* ADM constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct($options);
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -66,9 +66,9 @@ class AEBN extends AdultMovies
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function __construct(array $options = [])
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct($options);
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace Blacklight\processing\adult;
|
||||
|
||||
use voku\helper\HtmlDomParser;
|
||||
|
||||
abstract class AdultMovies
|
||||
{
|
||||
/**
|
||||
@@ -21,14 +23,10 @@ abstract class AdultMovies
|
||||
|
||||
/**
|
||||
* AdultMovies constructor.
|
||||
*
|
||||
* @param array $options
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function __construct(array $options = [])
|
||||
public function __construct()
|
||||
{
|
||||
$this->_html = new \simple_html_dom();
|
||||
$this->_html = new HtmlDomParser();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -72,14 +72,10 @@ class Hotmovies extends AdultMovies
|
||||
|
||||
/**
|
||||
* Hotmovies constructor.
|
||||
*
|
||||
* @param array $options
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function __construct(array $options = [])
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct($options);
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
protected function trailers()
|
||||
@@ -149,7 +145,7 @@ class Hotmovies extends AdultMovies
|
||||
}
|
||||
}
|
||||
}
|
||||
if (is_array($this->_res['productinfo'])) {
|
||||
if (\is_array($this->_res['productinfo'])) {
|
||||
$this->_res['productinfo'] = array_chunk($this->_res['productinfo'], 2, false);
|
||||
}
|
||||
|
||||
|
||||
@@ -60,9 +60,12 @@ class Popporn extends AdultMovies
|
||||
*/
|
||||
protected $_trailUrl = '';
|
||||
|
||||
public function __construct(array $options = [])
|
||||
/**
|
||||
* Popporn constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct($options);
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -202,8 +205,7 @@ class Popporn extends AdultMovies
|
||||
if ($ret = $this->_html->find('div#lside', 0)) {
|
||||
foreach ($ret->find('text') as $e) {
|
||||
$e = trim($e->innertext);
|
||||
$e = str_replace(',', '', $e);
|
||||
$e = str_replace(' ', '', $e);
|
||||
$e = str_replace([',', ' '], '', $e);
|
||||
if (stripos($e, 'Cast') !== false) {
|
||||
$cast = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user