From fabffa1f63ca43ea9c5120905632e2fa9c6176a4 Mon Sep 17 00:00:00 2001
From: "iyuu.cn" <367013672@qq.com>
Date: Tue, 24 Dec 2019 19:16:57 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9Ejoyhd=E3=80=81u2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/Protocols/dmhy.php | 193 +++++++++++++++++++++++++
app/Protocols/joyhd.php | 198 ++++++++++++++++++++++++++
app/Protocols/mteam.php | 4 +-
app/config/config.sample.php | 14 ++
app/dmhy.php | 3 +
app/joyhd.php | 3 +
readme.md | 2 +-
wiki/合作站点鉴权配置.md | 1 +
wiki/更新历史.md | 2 +-
wiki/自动辅种最简配置(windows篇).md | 1 +
10 files changed, 417 insertions(+), 4 deletions(-)
create mode 100644 app/Protocols/dmhy.php
create mode 100644 app/Protocols/joyhd.php
create mode 100644 app/dmhy.php
create mode 100644 app/joyhd.php
diff --git a/app/Protocols/dmhy.php b/app/Protocols/dmhy.php
new file mode 100644
index 0000000..4ed13db
--- /dev/null
+++ b/app/Protocols/dmhy.php
@@ -0,0 +1,193 @@
+ $v ){
+ $arr = array();
+ // 种子基本信息处理
+ // 偏移量
+ $offset = strpos($v,self::downloadPrefix);
+ // 截取
+ $urlTemp = substr($v,$offset,$len);
+ // 种子地址
+ $arr['url'] = substr($urlTemp,0,strpos($urlTemp,$downloadStrEnd));
+ // 种子id
+ $arr['id'] = substr($arr['url'],$downloadStrLen);
+
+ // 获取主标题
+ // 偏移量
+ $h1_len = strpos($v, '
') != false ) {
+ #$arr['title'] = str_replace(' | ',"",$arr['title']);
+ }
+ }
+
+ // 组合返回数组
+ self::$TorrentList[$k]['id'] = $arr['id'];
+ self::$TorrentList[$k]['h1'] = $arr['h1'];
+ self::$TorrentList[$k]['title'] = isset( $arr['title'] ) && $arr['title'] ? $arr['title'] : '';
+ self::$TorrentList[$k]['details'] = self::HOST.self::detailsPrefix.$arr['id'];
+ self::$TorrentList[$k]['download'] = self::HOST.$arr['url'];
+ self::$TorrentList[$k]['filename'] = $arr['id'].'.torrent';
+
+ // 种子促销类型解码
+ if(strpos($v,self::$getTorrent[0]) === false){
+ // 不免费
+ self::$TorrentList[$k]['type'] = 1;
+ }else{
+ // 免费种子
+ self::$TorrentList[$k]['type'] = 0;
+ }
+ // 存活时间
+ // 大小
+ // 种子数
+ // 下载数
+ // 完成数
+ // 完成进度
+ }
+ #p(self::$TorrentList);
+ return self::$TorrentList;
+ }
+}
diff --git a/app/Protocols/joyhd.php b/app/Protocols/joyhd.php
new file mode 100644
index 0000000..38a4b2a
--- /dev/null
+++ b/app/Protocols/joyhd.php
@@ -0,0 +1,198 @@
+ $v ){
+ $arr = array();
+ // 种子基本信息处理
+ // 偏移量
+ $offset = strpos($v,self::downloadPrefix);
+ // 截取
+ $urlTemp = substr($v,$offset,$len);
+ // 种子地址
+ $arr['url'] = substr($urlTemp,0,strpos($urlTemp,$downloadStrEnd));
+ // 种子id
+ $arr['id'] = substr($arr['url'],$downloadStrLen);
+
+ // 获取主标题
+ // 偏移量
+ $h1_offset = strpos($v, '","",$arr['title']);
+ // 第二次过滤
+ if ( strpos($arr['title'],'') != false ) {
+ #$arr['title'] = str_replace('',"",$arr['title']);
+ }
+ }
+
+ // 组合返回数组
+ self::$TorrentList[$k]['id'] = $arr['id'];
+ self::$TorrentList[$k]['h1'] = $arr['h1'];
+ self::$TorrentList[$k]['title'] = isset( $arr['title'] ) && $arr['title'] ? $arr['title'] : '';
+ self::$TorrentList[$k]['details'] = self::HOST.self::detailsPrefix.$arr['id'];
+ self::$TorrentList[$k]['download'] = self::HOST.$arr['url'];
+ self::$TorrentList[$k]['filename'] = $arr['id'].'.torrent';
+
+ // 种子促销类型解码
+ if(strpos($v,self::$getTorrent[0]) === false){
+ // 不免费
+ self::$TorrentList[$k]['type'] = 1;
+ }else{
+ // 免费种子
+ self::$TorrentList[$k]['type'] = 0;
+ }
+ // 存活时间
+ // 大小
+ // 种子数
+ // 下载数
+ // 完成数
+ // 完成进度
+ }
+ #p(self::$TorrentList);
+ return self::$TorrentList;
+ }
+}
diff --git a/app/Protocols/mteam.php b/app/Protocols/mteam.php
index 5a8b737..355eb2d 100644
--- a/app/Protocols/mteam.php
+++ b/app/Protocols/mteam.php
@@ -87,11 +87,11 @@ class Mteam implements decodeBase
* @param string
* @return array
*/
- public static function run()
+ public static function run($url = 'torrents.php')
{
self::init();
Rpc::init(self::SITE, self::METHOD);
- $html = self::get();
+ $html = self::get($url);
if ( $html === null ) {
exit(1);
}
diff --git a/app/config/config.sample.php b/app/config/config.sample.php
index 4578aeb..adea16f 100644
--- a/app/config/config.sample.php
+++ b/app/config/config.sample.php
@@ -356,6 +356,20 @@ return array(
// 如果需要自动辅种,必须配置
'passkey' => '',
),
+ // joyhd 序号:35
+ 'joyhd' => array(
+ // 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
+ 'cookie' => '',
+ // 如果需要自动辅种,必须配置
+ 'passkey' => '',
+ ),
+ // dmhy 序号:36
+ 'dmhy' => array(
+ // 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
+ 'cookie' => '',
+ // 如果需要自动辅种,必须配置
+ 'passkey' => '',
+ ),
// 配置文件结束
);
\ No newline at end of file
diff --git a/app/dmhy.php b/app/dmhy.php
new file mode 100644
index 0000000..9636e6a
--- /dev/null
+++ b/app/dmhy.php
@@ -0,0 +1,3 @@
+