修复瓷器主标题获取错误的bug

This commit is contained in:
iyuu.cn
2020-01-03 01:49:16 +08:00
parent 202565f16b
commit 0f4433f0a0
3 changed files with 8 additions and 5 deletions

View File

@ -92,11 +92,12 @@ class Hdchina implements decodeBase
self::init();
Rpc::init(self::SITE, self::METHOD);
$html = self::get($url);
p($html);
if ( $html === null ) {
exit(1);
}
$data = self::decode($html);
#p($data);exit;
p($data);exit;
Rpc::call($data);
exit(0);
}
@ -152,10 +153,8 @@ class Hdchina implements decodeBase
$arr['id'] = substr($id,$idStrLen);
// 获取主标题
// 偏移量
$h1_offset = strpos($v, '<a title="') + strlen('<a title="');
$h1_len = strpos($v, '" href="details.php?id=') - $h1_offset;
$arr['h1'] = substr($v, $h1_offset, $h1_len);
$arr['h1'] = selector::select($v, '//h3');
$arr['h1'] = selector::select($arr['h1'], '//a');
// 获取副标题(倒序算法)
// 偏移量

3
app/hdchina.php Normal file
View File

@ -0,0 +1,3 @@
<?php
require_once __DIR__ . '/init.php';
hdchina::run();

View File

@ -369,6 +369,7 @@ class iyuuAutoReseed
echo "clients_".$k."没有查询到可辅种数据 \n\n";
continue;
}
#p($infohash_Dir);
// 当前客户端辅种数据
$reseed = $resArray['clients_'.$k];
foreach ($reseed as $info_hash => $vv) {