fix:downHash

This commit is contained in:
david 2021-03-21 20:27:47 +08:00
parent 240e9332cf
commit 6b50b5e492
5 changed files with 42 additions and 15 deletions

View File

@ -33,7 +33,7 @@ class Rpc
/**
* 工作模式
*/
protected static $workingMode = '';
protected static $workingMode = 0;
/**
* 种子存放路径 (斜杠结尾)
*/

View File

@ -103,7 +103,7 @@ abstract class AbstractRss
/**
* 解析命令行参数 【静态方法】
* @param string $uuid 任务标识
* @return string 文件名
* @return string 文件名
*/
protected static function getCliInput($uuid)
{
@ -120,8 +120,7 @@ abstract class AbstractRss
echo microtime(true).' 命令行参数解析完成!'.PHP_EOL;
//cli(self::$conf);
$siteName = self::$conf['site']['name'];
$filename = isset(self::SITENAME_TO_FILENAME_MAP[$siteName]) ? self::SITENAME_TO_FILENAME_MAP[$siteName] : $siteName;
return $filename;
return isset(self::SITENAME_TO_FILENAME_MAP[$siteName]) ? self::SITENAME_TO_FILENAME_MAP[$siteName] : $siteName;
}
/**

View File

@ -17,6 +17,19 @@ class hddolby extends AbstractRss
*/
public $site = 'hddolby';
/**
* 初始化 第二步
*/
public function init()
{
//站点配置
$config = static::$conf['site'];
$this->cookies = isset($config['cookie']) && $config['cookie'] ? $config['cookie'] : '';
$this->passkey = isset($config['downHash']) && $config['downHash'] ? $config['downHash'] : '';
if (empty($this->passkey)) {
die($this->site.' 没有配置密钥,初始化错误。'.PHP_EOL);
}
}
/**
* 抽象方法,在类中实现
* 解码html为种子数组

View File

@ -4,11 +4,6 @@
*/
namespace IYUU\Rss;
use Curl\Curl;
use DOMDocument;
use DOMXpath;
use IYUU\Library\Rpc;
class hdhome extends AbstractRss
{
/**
@ -19,6 +14,19 @@ class hdhome extends AbstractRss
public static $official = array('HDHome','HDH','HDHTV','HDHPad','HDHWEB');
/**
* 初始化 第二步
*/
public function init()
{
//站点配置
$config = static::$conf['site'];
$this->cookies = isset($config['cookie']) && $config['cookie'] ? $config['cookie'] : '';
$this->passkey = isset($config['downHash']) && $config['downHash'] ? $config['downHash'] : '';
if (empty($this->passkey)) {
die($this->site.' 没有配置密钥,初始化错误。'.PHP_EOL);
}
}
/**
* 抽象方法,在类中实现
* 解码html为种子数组

View File

@ -4,11 +4,6 @@
*/
namespace IYUU\Rss;
use Curl\Curl;
use DOMDocument;
use DOMXpath;
use IYUU\Library\Rpc;
class pthome extends AbstractRss
{
/**
@ -16,8 +11,20 @@ class pthome extends AbstractRss
* @var string
*/
public $site = 'pthome';
public $rss_page = 'torrentrss.php?rows=50&exp=180&linktype=dl&passkey={}';
/**
* 初始化 第二步
*/
public function init()
{
//站点配置
$config = static::$conf['site'];
$this->cookies = isset($config['cookie']) && $config['cookie'] ? $config['cookie'] : '';
$this->passkey = isset($config['downHash']) && $config['downHash'] ? $config['downHash'] : '';
if (empty($this->passkey)) {
die($this->site.' 没有配置密钥,初始化错误。'.PHP_EOL);
}
}
/**
* 抽象方法,在类中实现
* 解码html为种子数组