diff --git a/app/Console/Commands/Bttool.php b/app/Console/Commands/Bttool.php new file mode 100644 index 0000000..3e442ff --- /dev/null +++ b/app/Console/Commands/Bttool.php @@ -0,0 +1,378 @@ +decodeFile('resources/t2.torrent'); + $torrent = \PHP\BitTorrent\Torrent::createFromTorrentFile('resources/t2.torrent'); + var_dump($torrent->getFileList()); +die;*/ +// $data = Bencode::load('resources/t2.torrent'); +// var_dump(json_encode($data,true)); + + $bcoder = new \Bhutanio\BEncode\BEncode; +// $bcoder->set([ +// 'announce'=>'http://www.private-tracker.com', +// 'comment'=>'Downloaded from Private Tracker', +// 'created_by'=>'PrivateTracker v1.0' +// ]); + + // decode Torrent file +// var_dump(file_get_contents('resources/t2.torrent')[0]);die; + $torrent = $bcoder->bdecode( file_get_contents('resources/t2.torrent')); +// var_dump(array_keys($torrent['info'])); +// die; +// print_r($torrent['info']['files']); + $Files = $torrent['info']['files']; + function create_ed2k($fname, $fsize, $fhash){ + $ed2k_out = 'ed2k://|file|' . $fname . '|' . $fsize . '|' . $fhash . '|/'; + return $ed2k_out; + } + function create_magnet($dn, $xl = false, $btih = '', $sha1 = '', $ed2k = '', $tree_tiger = '', $md5 = '') + { + $magnet = 'magnet:?'; + if ($dn){ + $magnet .= 'dn=' . $dn; // download name + } + if ($xl){ + $magnet .= '&xl=' . $xl; // size + } + if ($btih){ + $magnet .= '&xt=urn:btih:' . $btih; // bittorrent info_hash (Base32) + } + if ($sha1){ + $magnet .= '&xt=urn:sha1:' . $sha1; // gnutella sha1 (base32) + } + if ($ed2k){ + $magnet .= '&xt=urn:ed2k:' . $ed2k; // emule hash (Hex) + } + if ($tree_tiger){ + $magnet .= '&xt=urn:tree:tiger:' . $tree_tiger; // tiger (Base32) + } + if ($sha1 && $tree_tiger) { + $magnet .= '&xt=urn:bitprint:' . $sha1 . '.' . $tree_tiger; // Gnutella 2 (Shareaza) bitprint (Base32) + } + if ($md5){ + $magnet .= '&xt=urn:md5:' . $md5; // md5 hash (Hex) + } + return $magnet; + } + + + + + //var_dump($Files);// + foreach($Files as $File) { + + if(isset( $File['ed2k'])){ + + +// $hex = bin2hex($File['ed2k'] );//二进制转成16进制 + $f = $File; + $f["filehash"] =isset($f["filehash"]) ? bin2hex($f["filehash"]) : ''; + $f["ed2k"] =bin2hex($f["ed2k"]); + var_dump($f); + $sha1 ='';//isset($f["filehash"]) ? strtoupper(base32_encode($f["filehash"])) : ''; //isset($f["sha1"]) ? strtoupper(base32_encode($f["sha1"])) : ''; + $ed2k = $f["ed2k"]; + $tiger = isset($f["tiger"]) ? strtoupper(base32_encode($f["tiger"])) : ''; + $md5 = isset($f["md5sum"]) ? bin2hex($f["md5sum"]) : ''; + //hashes is set? + $ext_hashes = (isset($f["ed2k"]) || isset($f["sha1"]) || isset($f["tiger"]) || isset($f["md5sum"])); + if ($ext_hashes && isset($f["length"])) + { + if (isset($f["ed2k"])) + { + echo create_ed2k(max($f['path']), $f["length"], $f["ed2k"] ) ."\n"; + } + else + { + + } + // echo @create_magnet(max($f['path']), $f["length"], '', $sha1, $ed2k, $tiger, $md5)."\n\n"; + + } +/* + $s = create_ed2k(max($f['path']), $f["length"], bin2hex($f["ed2k"])); + var_dump($s); + die; + + var_dump($hex);//die; + var_dump(chr(hexdec($hex))); + $string=''; + for ($i=0; $i < strlen($hex)-1; $i+=2){ + $string .= chr(hexdec($hex[$i].$hex[$i+1])); + } + // $string = iconv("GBK","utf-8", $string); + + var_dump($string);die; +// $s =iconv('UTF-8//TRANSLIT', 'utf-8//TRANSLIT', $File['ed2k']); + + +// $encode = mb_detect_encoding($File['ed2k']); + $encode = mb_detect_encoding($File['ed2k'],array("ASCII","GB2312","GBK",'BIG5','UTF-8')); +var_dump($encode); + +var_dump($File['ed2k']); + + $s =iconv( $encode,'UTF-8//IGNORE', $File['ed2k']);; +// $s = utf8_encode( $File['ed2k']) ; + var_dump($s); + die;*/ + } + + + } + + // show Torrent contents + $files = $bcoder->filelist( $torrent ); +// print_r($files); +die; + // +// +// $bcoder = new \Bhutanio\BEncode\BEncode(); +// $bcoder->set([ +// 'announce'=>'http://www.private-tracker.com', +// 'comment'=>'Downloaded from Private Tracker', +// 'created_by'=>'PrivateTracker v1.0' +// ]); +// +// // decode Torrent file +// $torrent = $bcoder->bdecode('resources/t2.torrent' ); +// print_r($torrent); +// + $encoder = new \PHP\BitTorrent\Encoder(); + $decoder = new \PHP\BitTorrent\Decoder($encoder); + + $decodedFile = $decoder->decodeFile('resources/t2.torrent'); + +// $decodedFile-> +// $decodedFile = json_decode(json_encode($decodedFile)); +// var_dump($decodedFile); +// foreach ($decodedFile as $item) { +// var_dump(json_encode($item)); +// } + die; + } +} + + +class xBEncoder { + + const READY = 0; + const READ_STR = 1; + const READ_DICT = 2; + const READ_LIST = 3; + const READ_INT = 4; + const READ_KEY = 5; + + public $y; + protected $z, $m, $n; + protected $stat; + protected $stack; + + + /** + * This method saves the status of current + * encode/decode work. + */ + protected function push($newY, $newStat) { + array_push($this->stack, array($this->y, $this->z, $this->m, $this->n, $this->stat)); + list($this->y, $this->z, $this->m, $this->n, $this->stat) = array($newY, 0, 0, 0, $newStat); + } + + + /** + * This method restore the saved status of current + * encode/decode work. + */ + protected function pop() { + $t = array_pop($this->stack); + if ($t) { + if ($t[4] == self::READ_DICT) { + $t[0]->{$t[1]} = $this->y; + $t[1] = 0; + } elseif ($t[4] == self::READ_LIST) + $t[0][] = $this->y; + list($this->y, $this->z, $this->m, $this->n, $this->stat) = $t; + } + } + + + /** + * This method initializes the status of work. + * YOU SHOULD CALL THIS METHOD BEFORE EVERYTHING. + */ + public function init() { + $this->stat = self::READY; + $this->stack = array(); + $this->z = $this->m = $this->n = 0; + } + + /** + * This method decode $s($l as length). + * You can get $obj->y as the result. + */ + public function decode($s, $l) { + $this->y = 0; + for ($i = 0; $i < $l; ++$i) { + switch ($this->stat) { + case self::READY: + if ($s[$i] == 'd') { + $this->y = new xBDict(); + $this->stat = self::READ_DICT; + } elseif ($s[$i] == 'l') { + $this->y = array(); + $this->stat = self::READ_LIST; + } + break; + case self::READ_INT: + if ($s[$i] == 'e') { + $this->y->val = substr($s, $this->m, $i - $this->m); + $this->pop(); + } + break; + case self::READ_STR: + if (xBInt::isNum($s[$i])) + continue; + if ($s[$i] = ':') { + $this->z = substr($s, $this->m, $i - $this->m); + $this->y = substr($s, $i + 1, $this->z + 0); + $i += $this->z; + $this->pop(); + } + break; + case self::READ_KEY: + if (xBInt::isNum($s[$i])) + continue; + if ($s[$i] = ':') { + $this->n = substr($s, $this->m, $i - $this->m); + $this->z = substr($s, $i + 1, $this->n + 0); + $i += $this->n; + $this->stat = self::READ_DICT; + } + break; + case self::READ_DICT: + if ($s[$i] == 'e') { + $this->pop(); + break; + } elseif (!$this->z) { + $this->m = $i; + $this->stat = self::READ_KEY; + break; + } + case self::READ_LIST: + switch ($s[$i]) { + case 'e': + $this->pop(); + break; + case 'd': + $this->push(new xBDict(), self::READ_DICT); + break; + case 'i': + $this->push(new xBInt(), self::READ_INT); + $this->m = $i + 1; + break; + case 'l': + $this->push(array(), self::READ_LIST); + break; + default: + if (xBInt::isNum($s[$i])) { + $this->push('', self::READ_STR); + $this->m = $i; + } + } + break; + } + } + $rtn = empty($this->stack); + $this->init(); + return $rtn; + } + + /** + * This method encode $obj->y into BEncode. + */ + public function encode() { + return $this->_encDo($this->y); + } + + protected function _encStr($str) { + return strlen($str).':'.$str; + } + + protected function _encDo($o) { + if (is_string($o)) + return $this->_encStr($o); + if ($o instanceof xBInt) + return 'i'.$o->val.'e'; + if ($o instanceof xBDict) { + $r = 'd'; + foreach ($o as $k => $c) + $r .= $this->_encStr($k).$this->_encDo($c); + return $r.'e'; + } + if (is_array($o)) { + $r = 'l'; + foreach ($o as $c) + $r .= $this->_encDo($c); + return $r.'e'; + } + } +} + + +class xBDict {} + +class xBInt { + public $val; + + public function __construct($val = 0) { + $this->val = $val; + } + + public static function isNum($chr) { + $chr = ord($chr); + if ($chr <= 57 && $chr >= 48) + return true; + return false; + } +} \ No newline at end of file diff --git a/app/Console/Commands/JavbusCrawler.php b/app/Console/Commands/JavbusCrawler.php index 70ed733..44c9cf1 100644 --- a/app/Console/Commands/JavbusCrawler.php +++ b/app/Console/Commands/JavbusCrawler.php @@ -228,6 +228,7 @@ public function handle() return; } + // if($this->option('movie')==1){ $movie404 = $this->option('movie404')*1; $moviemax = $this->option('moviemax')*1; @@ -263,7 +264,7 @@ public function update_ja_code_36($table_javbus ,$table_avmoo) ]); foreach ($d as $key => $val ) { $this->database->query( "update {$table_javbus} set avmoo_code_36 = '{$val['code_36']}' WHERE movie_pic_cover = '{$val['movie_pic_cover']}' " ); - echo "update avmoo_code_36 $key == {$val['code_36']} == {$val['movie_pic_cover']}\n "; + echo "update avmoo_code_36 :: $key == {$val['code_36']} == {$val['movie_pic_cover']}\n "; } $data = $this->database->query( " SELECT count(1) as avmoo_code_36_null_num from {$table_javbus} WHERE avmoo_code_36 ='' " )->fetchAll(\PDO::FETCH_ASSOC); echo "avmoo_code_36_null_num : {$data[0]['avmoo_code_36_null_num']} \n"; diff --git a/app/Console/Commands/JavlibraryCrawler.php b/app/Console/Commands/JavlibraryCrawler.php new file mode 100644 index 0000000..b12f182 --- /dev/null +++ b/app/Console/Commands/JavlibraryCrawler.php @@ -0,0 +1,432 @@ +option('genre')){ + $this->handle_genre(); + } + + if($this->option('movie')){ + $this->handle_movie(); + } +// if($this->option('page')*1 >0){ +// $this->handle_all_page($this->option('page')*1); +// } +// if($this->option('magpage')!== null){ +// $this->handle_all_magnet($this->option('magpage')*1); +// } + //php artisan avbook:javbus --movie=1 --page=10 --magpage=10 --movie404=1 + } + public $max_concurrency = 16; + public function handle_genre() + { + + $cf =\App\Tools\CrawlerUpdate::get_crawler_config(); + + $this->sphost = $cf['javlibhost']; + $this->hosturl = "http://{$this->sphost}/"; + + $start_type = "gern"; + $headers = [ + 'Accept'=>'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8', + 'Accept-Encoding'=>'gzip, deflate', + 'Accept-Language'=>'zh-CN,zh;q=0.9,en;q=0.8', + 'Cache-Control'=>'max-age=0', + 'Connection'=>'keep-alive', + 'Cookie'=>'__cfduid=de58b540550437dded9edf806e15e97921558631740; timezone=-480; over18=18; __qca=P0-1061630505-1558631744517; Hm_lvt_bfc6c23974fbad0bbfed25f88a973fb0=1558632657; Hm_lpvt_bfc6c23974fbad0bbfed25f88a973fb0=1558632681', + 'Host'=>$this->sphost, + 'Upgrade-Insecure-Requests'=>'1', + 'User-Agent'=>'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.81 Safari/537.36', +// 'User-Agent'=>'Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)' + ]; + $this->crawler_client_init($this->hosturl,$start_type,$this->table_prefix,$headers); + + $client = new \GuzzleHttp\Client(['headers'=>$headers,'http_errors' => false ]); + +// $response=$client->get($this->hosturl.'cn/vl_genre.php?list&mode=2&page=1&g=aqja' ); +// $original_body = (string)$response->getBody(); +// $content = mb_convert_encoding($original_body, 'UTF-8', $this->spcharset); +// preg_match_all('#
#', $content, $out); +// var_dump($out[1]); +// die; + + + $response=$client->get($this->hosturl.'cn/genres.php' ); + $type = $response->getHeader('content-type'); + $parsed = \GuzzleHttp\Psr7\parse_header($type); + $original_body = (string)$response->getBody(); + $this->spcharset = isset($parsed[0]['charset']) ?$parsed[0]['charset']: 'UTF-8'; + $html = mb_convert_encoding($original_body, 'UTF-8', $this->spcharset); + preg_match_all('#vl_genre.php\?g=(.*?)">(.*?)#', $html, $out); +// var_dump($out);die; + $data = array(); + $this->arr_req_rejected = []; + foreach ($out[1] as $key => $value) { + $value = trim($value); + if(!empty($value)){ + $this->arr_req_rejected[] = $value; + $temp_arr = array(); + $temp_arr['genre_code']=$value; + $temp_arr['genre_dsce']=$out[2][$key]; + $temp_arr['code_10']=base_convert($value,36,10); + array_push($data ,$temp_arr); + } + } + $this->database->insert('avbook_javlib_genre', $data ); + +// foreach ($this->arr_req_code_36 as $key=> $item) { +// $uri = 'http://'.$this->sphost.'/cn/vl_genre.php?list&mode=2&page=1&g='.$item; +// echo "$uri \n"; +// $response=$client->get($uri); +// $original_body = (string)$response->getBody(); +// $content = mb_convert_encoding($original_body, 'UTF-8', $this->spcharset); +// preg_match('#database->query( $sql); +// } +// +// die; + + //获取每个分类的最后一页 + while(1){ + if(!empty($this->arr_req_rejected)){ + $this->arr_req_code_36 = $this->arr_req_rejected; + $this->arr_req_rejected = []; + }else{ + break; + } + $total = count($this->arr_req_code_36); + $requests = function ($total) { + foreach ($this->arr_req_code_36 as $key=> $item) { + $uri = 'http://'.$this->sphost.'/cn/vl_genre.php?list&mode=2&page=1&g='.$item; + echo "[当前($key) 总数($total)| =($item)-|]"; + yield new Request('GET', $uri ,['verify' => false]); + } + }; + $this->sprequests = $requests($total); + $pool = new Pool($this->spclient,$this->sprequests , [ + 'concurrency' => $this->max_concurrency, + 'options' => ['timeout' => 6], + 'fulfilled' => function ($response, $index) { + echo "[get res:$index]"; + $c36 = isset($this->arr_req_code_36[$index])?$this->arr_req_code_36[$index]:'2'; + + $original_body = (string)$response->getBody(); + $content = mb_convert_encoding($original_body, 'UTF-8', $this->spcharset); + + if (strpos($content, '')===false) { + $this->arr_req_rejected[] =$c36; + $this->warn("$c36 页面不完整"); + return; + } + preg_match('#database->query( $sql); + /*while ($pnum >1){ + $uri = $pnum.'&g='.$c36; + $pnum=$pnum-1; + $this->arr_requrl[] = $uri; + }*/ + }, + 'rejected' => function ($reason, $index) { + $c36 = isset($this->arr_req_code_36[$index])?$this->arr_req_code_36[$index]:'1'; + $this->arr_req_rejected[] =$c36; + $this->error("[$index = $c36 = rejected]" ); + }, + ]); + $promise = $pool->promise(); + $promise->wait(); +echo "======================================="; + } + $this->arr_requrl=[]; + $sql ="SELECT * from avbook_javlib_genre "; + $table_genre = $this->database->query( $sql)->fetchAll(\PDO::FETCH_ASSOC); + $mpage = 3; + foreach ($table_genre as $gen) { + $pnum = $gen['page_num']-$gen['old_page_num'] +1; + echo "$pnum \n"; + if ($pnum <$mpage) { + $pnum =$gen['page_num'] > $mpage? $mpage:$gen['page_num']; + } + while ($pnum >0){ + $uri = $pnum.'&g='.$gen['genre_code']; + $this->arr_requrl[] = $uri; + $pnum=$pnum-1; + } + } + + + //获取每个分类页面的 vid + $this->arr_req_rejected = $this->arr_requrl; + while(1) { + if (!empty($this->arr_req_rejected)) { + $this->arr_requrl = $this->arr_req_rejected; + $this->arr_req_rejected = []; + } else { + break; + } + $total = count($this->arr_requrl); + $requests = function ($total) { + foreach ($this->arr_requrl as $key=> $item) { + $uri ='http://'.$this->sphost.'/cn/vl_genre.php?list&mode=2&page='.$item; + echo "[当前($key) 总数($total)| =($item)-|] \n"; + yield new Request('GET', $uri ); + } + }; + $this->sprequests = $requests($total); + $pool = new Pool($this->spclient,$this->sprequests , [ + 'concurrency' => $this->max_concurrency, + 'options' => ['timeout' => 18], + 'fulfilled' => function ($response, $index) { + $code = $response->getStatusCode(); + $c36 = $this->arr_requrl[$index]; + echo "[ code $code $index = $c36]" ; + if($code==200){ + + $original_body = (string)$response->getBody(); + $content = mb_convert_encoding($original_body, 'UTF-8', $this->spcharset); + if (strpos($content, '')===false) { + $this->arr_req_rejected[] =$c36; + $this->warn("$c36 页面不完整"); + } + preg_match_all('#
#', $content, $out); + + $data = array(); + foreach ($out[1] as $key => $value) { + $temp_arr =[]; + $temp_arr['vid']=trim($value); + if(!empty($temp_arr['vid'])) $data[] = $temp_arr; + } + $this->database->insert('avbook_javlib_vid', $data); + }else{ + $this->arr_req_rejected[] =$c36; + } + }, + 'rejected' => function ($reason, $index) { + $c36 = isset($this->arr_requrl[$index])?$this->arr_requrl[$index]:'2'; + $this->arr_req_rejected[] =$c36; + $this->error("[$index = $c36 = rejected]" ); + }, + ]); + $promise = $pool->promise(); + $promise->wait(); + echo "======================================="; + } + } + public $arr_requrl ; + + public $arr_req_rejected ; + + + + public function handle_movie($moviemax=128) + { + $cf =\App\Tools\CrawlerUpdate::get_crawler_config(); + + $this->sphost = $cf['javlibhost']; + $this->hosturl = "http://{$this->sphost}/"; + + $start_type = "movie"; + $headers = [ + 'Accept'=>'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8', + 'Accept-Encoding'=>'gzip, deflate', + 'Accept-Language'=>'zh-CN,zh;q=0.9,en;q=0.8', + 'Cache-Control'=>'max-age=0', + 'Connection'=>'keep-alive', + 'Cookie'=>'__cfduid=de58b540550437dded9edf806e15e97921558631740; timezone=-480; over18=18; __qca=P0-1061630505-1558631744517; Hm_lvt_bfc6c23974fbad0bbfed25f88a973fb0=1558632657; Hm_lpvt_bfc6c23974fbad0bbfed25f88a973fb0=1558632681', + 'Host'=>$this->sphost, + 'Upgrade-Insecure-Requests'=>'1', + 'User-Agent'=>'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.81 Safari/537.36' + ]; + $this->crawler_client_init($this->hosturl,$start_type,$this->table_prefix,$headers); + +// $client = new \GuzzleHttp\Client(['headers'=>$headers,'http_errors' => false ]); +// +// $response=$client->get($this->hosturl.'cn/?v=javli7qg2i' ); +// +// $d = $this->get_info_movie($response,'javli7qg2i'); +// $this->database->insert('avbook_javlib_movie', $d); + + $sql = "select vid from avbook_javlib_vid "; + $this->info($sql); + $table_vid = $this->database->query($sql)->fetchAll(\PDO::FETCH_COLUMN, 0); + $this->info(count($table_vid)); + $sql = "select code_36 from avbook_javlib_movie "; + $this->info($sql); + $table_code_36 = $this->database->query($sql)->fetchAll(\PDO::FETCH_COLUMN, 0); + $this->info(count($table_code_36)); + $this->arr_req_rejected=array_diff($table_vid,$table_code_36); + while(1){ + if(!empty($this->arr_req_rejected)){ + $this->arr_req_code_36 = array_values($this->arr_req_rejected); + $this->arr_req_rejected = []; + }else{ + break; + } + $total = count($this->arr_req_code_36); + if($total==1 && $this->arr_req_code_36[0]==''){ + $this->info(" 数量: $total"); + break; + } + $this->info("{$this->start_type} 升级数量: $total"); + + $requests = function ($total) { + foreach ($this->arr_req_code_36 as $key=> $item) { + $uri = 'http://'.$this->sphost.'/cn/?v='.$item; + echo "[当前($key) 总数($total)| =($item)-|]"; + yield new Request('GET', $uri ); + } + }; + $this->sprequests = $requests($total); + $pool = new Pool($this->spclient,$this->sprequests , [ + 'concurrency' => 64, + 'options' => ['timeout' => 18], + 'fulfilled' => function ($response, $index) { + $code = $response->getStatusCode(); + $c36 = $this->arr_req_code_36[$index]; + if($code==200){ + echo "[get res:$index $c36 ]\n"; + $d= $this->get_info_movie($response,$c36); + if(empty($d)){ + if(!empty($c36))$this->arr_req_rejected[] =$c36; + }else{ + $this->database->insert('avbook_javlib_movie', $d); + } + }else{ + $this->arr_req_rejected[] =$c36; + } + }, + 'rejected' => function ($reason, $index) { + $c36 = isset($this->arr_req_code_36[$index])?$this->arr_req_code_36[$index]:'2'; + $this->arr_req_rejected[] =$c36; + $this->error("[$index = $c36 = rejected]" ); + }, + ]); + $promise = $pool->promise(); + $promise->wait(); + echo "======================================="; + } + +// var_dump($d);die; + + } + + + public function get_info_movie($response,$c_36=''){ + $original_body = (string)$response->getBody(); + $content = mb_convert_encoding($original_body, 'UTF-8', $this->spcharset); + + if (strpos($content, '')===false) { + echo "页面不完整"; + return null ;//不完整 + } + $arr_data = array(); + $arr_data['code_36'] = $c_36;////'gid' + $arr_data['code_10'] = base_convert($c_36,36,10) ; + $code_36=$c_36; + //$arr_data[] = substr(base_convert($out[1],36,10), 4); + preg_match('#识别码:[\s]*?(.*?)#', $content, $out); + $censored_id = empty($out[1]) ? '' : $out[1];////'censored_id' + $arr_data['censored_id']=$censored_id; + preg_match('#(.*?) - JAVLibrary#', $content, $out); + $arr_data['movie_title'] = empty($out[1]) ? '' : trim(str_replace($censored_id, '', $out[1]));////'movie_title' + preg_match('#id="video_jacket_img" src="(.*?)"#', $content, $out); + $arr_data['movie_pic_cover'] = empty($out[1]) ? '' : str_replace(['http://pics.dmm.co.jp/mono/movie/adult/','//pics.dmm.co.jp/mono/movie/adult/'], '',$out[1]);//'movie_pic_cover'//替换 域名 http://pics.dmm.co.jp/ + + //$arr_data['movie_pic_cover'] = getjavImg($out[1]); + //echo $out[1].$arr_data['movie_pic_cover']; + + preg_match('#发行日期:[\s]*?(.*?)#', $content, $out); + $arr_data['release_date'] = empty($out[1]) ? '' : $out[1];//'release_date' + + preg_match('#长度:[\s]*?(.*?) 分钟#', $content, $out); + $arr_data['movie_length'] = empty($out[1]) ? '' : $out[1];// 'movie_length' + + preg_match('#href="vl_director.php\?d=(.*?)"#', $content, $out); + $arr_data['Director'] = empty($out[1]) ? '' : $out[1];//'Director' + + preg_match('#href="vl_maker.php\?m=(.*?)"#', $content, $out); + $arr_data['Studio'] = empty($out[1]) ? '' : $out[1];//'Studio' + + preg_match('#href="vl_label.php\?l=(.*?)"#', $content, $out); + $arr_data['Label'] = empty($out[1]) ? '' : $out[1];//'Label' + + preg_match('#\((.*?)\)#', $content, $out); + $arr_data['score'] = empty($out[1]) ? '' : (floatval($out[1]));//'score' + //var_dump(floatval($out[1]));die; + /* preg_match_all('##', $content, $out); + $arr_data[] = empty($out[1]) ? '' : implode(',',$out[1]);//'Series' */ + + preg_match_all('#href="vl_genre.php\?g=(.*?)"#', $content, $out); + $arr_data['Genre'] = empty($out[1]) ? '' : '['.implode('][',$out[1]).']';//'Genre' + //var_dump(implode(',',$out[1]));die; + + preg_match_all('#href="vl_star.php\?s=(.*?)"#', $content, $out); + // $arr_data[] = empty($out[1]) ? '' : implode('[]',$out[1]); + $arr_data['JAV_Idols'] = empty($out[1]) ? '' : '['.implode('][',$out[1]).']';//'JAV_Idols' + + //preg_match_all('#div class="photo-frame">(.*?)'; + preg_match("#$s#", $content, $out); + $arr_data['userswanted'] = empty($out[1]) ? '' : $out[1];//'Director' + preg_match('#href="userswatched.php\?v='.$code_36.'">(.*?)#', $content, $out); + $arr_data['userswatched'] = empty($out[1]) ? '' : $out[1];//'Director' + preg_match('#href="usersowned.php\?v='.$code_36.'">(.*?)#', $content, $out); + $arr_data['usersowned'] = empty($out[1]) ? '' : $out[1];//'Director' + + + $arr_data['comments'] = strpos($content,'空的列表')===false ? 1 : 0; + return $arr_data; + } +} diff --git a/app/Http/Controllers/AvbookController.php b/app/Http/Controllers/AvbookController.php index b1ec661..2d910ad 100644 --- a/app/Http/Controllers/AvbookController.php +++ b/app/Http/Controllers/AvbookController.php @@ -1,6 +1,7 @@ 'have_hd', @@ -85,21 +87,35 @@ public function index(Request $request) $where_books[] =['JAV_Idols','like','%['.$request->st.']%']; $data['res_star']=Actresses::where('code_36',$request->st)->first();; } + if($request->st1){ + $where_books[] =['JAV_Idols','like','%['.$request->st1.']%']; + $data['res_star1']=Actresses::where('code_36',$request->st)->first();; + } if($request->st0){ $where_books[] =['JAV_Idols','['.$request->st0.']']; } + if($request->str_w){ + $arr_temp = explode('-',$request->str_w); + $where_books[] =[$arr_temp[0],$arr_temp[1]]; + } if($request->orderby){ $orderby = $request->orderby; } $idkeyk= []; if($request->search){ - + $pt= '搜索:'.$request->search; + if(isset($page_info['ltitle'])) $page_info['ltitle'] = array_diff($page_info['ltitle'], ["$pt"]); + $page_info['ltitle'][] = $pt; preg_match_all('/([a-zA-Z]{2,6})[-|_|\s]{0,3}([0-9]{3,4})(.*?)/', $request->search,$out); foreach ($out[1] as $key => $value) { $idkeyk[strtoupper($out[1][$key]).'-'.$out[2][$key]]=1;//."({$out[0][$key]})" } if (empty($idkeyk)) { - $where_books[] =['movie_title','like','%'.$request->search.'%']; + if (ctype_alnum($request->search)) { + $where_books[] =['censored_id','like','%'.$request->search.'%']; + }else{ + $where_books[] =['movie_title','like','%'.$request->search.'%']; + } }else{ $idkeyk=array_keys($idkeyk); } @@ -126,6 +142,199 @@ public function index(Request $request) return view('layout_censored',$data ); } + public function javlib(Request $request) + { +// $where_map = ['hd' => 'have_hd', +// 'sub' => 'have_sub', +// 'file' => 'have_file', +// 'Series' => 'Series', +// 'Label' => 'Label', +// 'Studio' => 'Studio', +// 'director' => 'director','wanted' => 'wanted' +// ]; + $table_key = ['movie_title','movie_pic_cover','censored_id', + 'have_file','have_mg','have_sub','have_hd','owned','favorite','wanted','watched', + 'Genre','code_36','release_date']; +// $title = ''; +// $orderby = "magnet_date"; +// $where_books = []; +// $page_info = []; +// +// foreach ($request->all() as $key => $value) { +// if(isset($where_map[$key])){ +// $where_books[]=[$where_map[$key],$value]; +// } +// $page_info[$key] = $value; +// } +// if($request->mg=='1'){ +// $where_books[] =['have_mg','1']; +// }elseif($request->mg==='0'){ +// $orderby = 'code_10'; +// } +// if($request->ltitle){ +// $request->ltitle = array_unique($request->ltitle); +// $title = implode('-',$request->ltitle); +// } +//// var_dump($request->owned);die; +// if($request->owned=='1'){ +// $where_books[] =['owned','1']; +// $page_info['ltitle'] = array_diff($page_info['ltitle'], ["未拥有"]); +// }elseif ($request->owned === '0'){ +// //var_dump($page_info['ltitle']);die; +// $page_info['ltitle'] = array_diff($page_info['ltitle'], ["已拥有"]); +// $where_books[] =['owned','0']; +// } +// if($request->favorite=='1'){ +// $where_books[] =['favorite','>','0'];; +// } +// +// +// if($request->notfile){ +// $where_books[] =['have_file','!=',$request->notfile]; +// } +// if($request->notSeries=='_'){ +// $where_books[] =['Series','!=','']; +// } +// if($request->gc){ +// $request->gc = array_unique($request->gc); +// foreach ($request->gc as $genrecode) { +// $where_books[] =['Genre','like','%['.$genrecode.']%']; +// } +// } +// if($request->strgc){ +// $arr_gc = explode('-',$request->strgc); +// foreach ($arr_gc as $genrecode) { +// $where_books[] =['Genre','like','%['.$genrecode.']%']; +// } +// } +// +// if($request->notgc){ +// $request->notgc = array_unique($request->notgc); +// foreach ($request->notgc as $genrecode) { +// $where_books[] =['Genre','not like','%['.$genrecode.']%']; +// } +// } +// if($request->st){ +// $where_books[] =['JAV_Idols','like','%['.$request->st.']%']; +// $data['res_star']=Actresses::where('code_36',$request->st)->first();; +// } +// if($request->st1){ +// $where_books[] =['JAV_Idols','like','%['.$request->st1.']%']; +// $data['res_star1']=Actresses::where('code_36',$request->st)->first();; +// } +// if($request->st0){ +// $where_books[] =['JAV_Idols','['.$request->st0.']']; +// } +// if($request->str_w){ +// $arr_temp = explode('-',$request->str_w); +// $where_books[] =[$arr_temp[0],$arr_temp[1]]; +// } +// if($request->orderby){ +// $orderby = $request->orderby; +// } +// $idkeyk= []; +// if($request->search){ +// +// preg_match_all('/([a-zA-Z]{2,6})[-|_|\s]{0,3}([0-9]{3,4})(.*?)/', $request->search,$out); +// foreach ($out[1] as $key => $value) { +// $idkeyk[strtoupper($out[1][$key]).'-'.$out[2][$key]]=1;//."({$out[0][$key]})" +// } +// if (empty($idkeyk)) { +// $where_books[] =['movie_title','like','%'.$request->search.'%']; +// }else{ +// $idkeyk=array_keys($idkeyk); +// } +// } + + if(!empty($where_books)){ + $Avbooks = Avbooks::select($table_key)->where($where_books)->orderBy($orderby, 'desc')->orderBy('code_10', 'desc')->paginate(config('avbook.cen_per_page')); + //return $Avbooks; + }else{ + if(empty($idkeyk)){ + $Avbooks = Javlibrary::orderBy('usersowned', 'desc')->orderBy('userswanted', 'desc')->orderBy('userswatched', 'desc')->orderBy('release_date', 'desc')->paginate(config('avbook.cen_per_page')); + }else{ + $Avbooks = Avbooks::select($table_key)->whereIn('censored_id', $idkeyk)->orderBy('code_10', 'desc')->paginate(config('avbook.cen_per_page')); + if ($Avbooks->count()==1){ + Header("Location: ".url('/movie?censored_id='.$Avbooks->first()->censored_id)); + } + } + } + + $data['list']= $Avbooks; + $data['title']= ''; + $data['filter']= config('avbook.filter'); + $data['page_info']= []; + return view('layout_javlib',$data ); + } + public function javlibmovie(Request $request) + { + $censored_id = $request->censored_id; + $censored_id = str_replace(" ",'',$censored_id); + if($request->checkid){ + $request->checkid = str_replace(" ",'',$request->checkid); + if(strpos($request->checkid,'-')===false){ + preg_match('#(\d{1,5})#', $request->checkid, $out); + if(isset($out[1])){ + $censored_id = str_replace($out[1],'',$request->checkid)."-".$out[1]; + Header("Location: ".url('/movie?censored_id='.$censored_id)); + die; + } + } + $censored_id = $request->checkid; + } + preg_match('#(\d{1,5})#', explode('-',$censored_id)[1], $outnum); + if(isset($outnum[1])){ + $censored_id_num = $outnum[1]; + $data['last_censored_id'] = str_replace($censored_id_num,''.sprintf('%03s', $censored_id_num+1),$censored_id); + $data['next_censored_id'] = str_replace($censored_id_num,''.sprintf('%03s', $censored_id_num-1),$censored_id); + } + + if($request->id){ + $movie_info= Javlibrary::where('code_36',$request->id)->first(); + }else{ + $movie_info= Movies::where('censored_id',$censored_id)->orderBy('code_10', 'desc')->first(); + } + if (empty($movie_info)) { + die($censored_id ."==not find <=== || ===> "); + } +// if($movie_info['visited']<254){ +// $movie_info['visited']=$movie_info['visited'] +1; +// $t_update = ['visited'=>$movie_info['visited']]; +// Avbooks::where('code_36',$movie_info['code_36'])->update($t_update); +// +// } + $find=array('[',']'); + $movie_info['JAV_Idols'] = str_replace($find, '',str_replace('][', ',', $movie_info['JAV_Idols'])); + $arr_star = explode(',', $movie_info['JAV_Idols']); + $idols_info = Actresses::whereIn('code_36', $arr_star)->get(); + + $movie_info['Genre'] = str_replace($find, '',str_replace('][', ',', $movie_info['Genre'])); + $arr_genre_code =explode(',', $movie_info['Genre']) ; + $genre_info = DB::table('avbook_avmoo_genre') + ->whereIn('genre_code', $arr_genre_code)->get(); + +// $avbus = Javbus::where('avmoo_code_36',$movie_info['code_36'])->orWhere('censored_id',$movie_info['censored_id'])->first(); + +// $res_more= [ ]; +// if (!empty($avbus->Similar)) { +// $Similar= explode(',', str_replace($find, '',str_replace('][', ',',$avbus->Similar))); +// $res_more =Avbooks::whereIn('censored_id', $Similar)->get(); +// } + $genre_config=['4m'=>'主观视角','8'=>'眼镜' ]; + // [['class="btn-warning ',''],['4m'=>'主观视角','8'=>'眼镜','84m'=>'完全主观' ]];//自定义添加类别 + + $data['res_star'] = json_decode(json_encode($idols_info),true); ;//$user->toArray(); + $data['res_genre'] = json_decode(json_encode($genre_info),true); + $data['genre_config'] = $genre_config; + $data['res_more'] = []; + $data['movie_info'] = $movie_info; + $data['avbus'] = [] ; + $data['url_config'] = \App\Tools\CrawlerUpdate::get_crawler_config() ; + $data['pagenext'] = ''; + + return view('layout_javlibmovie', $data); + + } public function movie(Request $request) { @@ -143,7 +352,7 @@ public function movie(Request $request) } $censored_id = $request->checkid; } - preg_match('#(\d{1,5})#', $censored_id, $outnum); + preg_match('#(\d{1,5})#', explode('-',$censored_id)[1], $outnum); if(isset($outnum[1])){ $censored_id_num = $outnum[1]; $data['last_censored_id'] = str_replace($censored_id_num,''.sprintf('%03s', $censored_id_num+1),$censored_id); @@ -200,6 +409,8 @@ public function genre(Request $request) { return view('layout_genre'); } + + public function actresses(Request $request) { $data['actresses']= Actresses::orderBy('file_num', 'desc')->paginate(30); diff --git a/app/Models/Javlibrary.php b/app/Models/Javlibrary.php new file mode 100644 index 0000000..ff827aa --- /dev/null +++ b/app/Models/Javlibrary.php @@ -0,0 +1,15 @@ +hasOne('App\Models\Avbooks','censored_id','censored_id'); + } +} diff --git a/app/Models/Movies.php b/app/Models/Movies.php index 20ea14a..b1a0d77 100644 --- a/app/Models/Movies.php +++ b/app/Models/Movies.php @@ -25,5 +25,9 @@ public function label_name() { return $this->hasOne('App\Models\Label','code_36','Label'); } + public function javlib() + { + return $this->hasOne('App\Models\Javlibrary','censored_id','censored_id'); + } } diff --git a/composer.json b/composer.json index 4b319e0..c29a220 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,9 @@ "license": "MIT", "require": { "php": "^7.1.3", + "bhutanio/torrent-bencode": "dev-master", "catfan/medoo": "^1.6", + "christeredvartsen/php-bittorrent": "^1.1", "fideloper/proxy": "^4.0", "guzzlehttp/guzzle": "^6.3", "jaeger/querylist": "^4.1", @@ -17,7 +19,8 @@ "kartik-v/bootstrap-star-rating": "dev-master", "laravel/framework": "5.8.*", "laravel/tinker": "^1.0", - "mavinoo/laravel-batch": "dev-master" + "mavinoo/laravel-batch": "dev-master", + "sandfoxme/bencode": "^1.3" }, "require-dev": { "beyondcode/laravel-dump-server": "^1.0", diff --git a/composer.lock b/composer.lock index e82b051..f0063dd 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "80eb02192461c62ebeebae4b36e2b87c", + "content-hash": "5ddc85b4c8fcf02be50e2615abbdc30c", "packages": [ { "name": "ares333/php-curl", @@ -55,6 +55,57 @@ ], "time": "2018-12-13T03:47:27+00:00" }, + { + "name": "bhutanio/torrent-bencode", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/bhutanio/torrent-bencode.git", + "reference": "6209c23a83b234bc07661df53d6b810321bbd7b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bhutanio/torrent-bencode/zipball/6209c23a83b234bc07661df53d6b810321bbd7b4", + "reference": "6209c23a83b234bc07661df53d6b810321bbd7b4", + "shasum": "", + "mirrors": [ + { + "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "autoload": { + "psr-0": { + "Bhutanio": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "abi", + "homepage": "http://abi.io" + } + ], + "description": "PHP Library for decoding and encoding BitTorrent BEncoded data", + "homepage": "https://github.com/bhutanio/torrent-bencode", + "keywords": [ + "bdecode", + "bencode", + "bittorrent", + "decode", + "encode", + "torrent" + ], + "time": "2018-09-27T23:45:35+00:00" + }, { "name": "cache/adapter-common", "version": "1.1.0", @@ -322,6 +373,56 @@ ], "time": "2018-12-08T20:24:23+00:00" }, + { + "name": "christeredvartsen/php-bittorrent", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/christeredvartsen/php-bittorrent.git", + "reference": "a9315b6f93b45872667875668423cdb823f615d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/christeredvartsen/php-bittorrent/zipball/a9315b6f93b45872667875668423cdb823f615d0", + "reference": "a9315b6f93b45872667875668423cdb823f615d0", + "shasum": "", + "mirrors": [ + { + "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "3.7.*" + }, + "type": "library", + "autoload": { + "psr-0": { + "PHP\\BitTorrent": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christer Edvartsen", + "email": "cogo@starzinger.net" + } + ], + "description": "PHP\\BitTorrent is a set of components that can be used to interact with torrent files (read+write) and classes that can encode/decode to/from the BitTorrent format.", + "homepage": "https://github.com/christeredvartsen/php-bittorrent", + "keywords": [ + "bittorrent", + "torrent" + ], + "time": "2013-01-11T12:12:20+00:00" + }, { "name": "dnoegel/php-xdg-base-dir", "version": "0.1", @@ -2499,6 +2600,64 @@ ], "time": "2018-07-19T23:38:55+00:00" }, + { + "name": "sandfoxme/bencode", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/sandfoxme/bencode.git", + "reference": "82195cf7519a1656e05fa21843e9653129d257ee" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sandfoxme/bencode/zipball/82195cf7519a1656e05fa21843e9653129d257ee", + "reference": "82195cf7519a1656e05fa21843e9653129d257ee", + "shasum": "", + "mirrors": [ + { + "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.0|^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0.0", + "psy/psysh": "^0.8.3" + }, + "suggest": { + "php-64bit": "Running 64 bit is recommended to prevent integer overflow" + }, + "type": "library", + "autoload": { + "psr-4": { + "SandFox\\Bencode\\": "src" + }, + "classmap": [ + "legacy.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anton Smirnov", + "email": "sandfox@sandfox.me" + } + ], + "description": "BitTorrent's Bencode encoder/decoder", + "keywords": [ + "bencode", + "bittorrent", + "serialize", + "torrent" + ], + "time": "2019-02-14T06:47:41+00:00" + }, { "name": "swiftmailer/swiftmailer", "version": "v6.2.1", @@ -6244,6 +6403,7 @@ "aliases": [], "minimum-stability": "dev", "stability-flags": { + "bhutanio/torrent-bencode": 20, "kartik-v/bootstrap-star-rating": 20, "mavinoo/laravel-batch": 20 }, diff --git a/config/urlconfig.php b/config/urlconfig.php index e837ab4..dc7bc59 100644 --- a/config/urlconfig.php +++ b/config/urlconfig.php @@ -1,6 +1,7 @@ 'javzoo.com', +return ['avmoohost'=>'avmoo.asia', 'javbushost'=>'www.javbus.life', + 'javlibhost'=>'www.c32r.com', 'btsourl' => 'https://btsow.pw/search/' ]; diff --git a/database/migrations/2019_07_02_090723_create_avbook_javlib_genre_table.php b/database/migrations/2019_07_02_090723_create_avbook_javlib_genre_table.php new file mode 100644 index 0000000..8bdb29e --- /dev/null +++ b/database/migrations/2019_07_02_090723_create_avbook_javlib_genre_table.php @@ -0,0 +1,36 @@ +string('genre_code', 11)->primary(); + $table->string('genre_dsce', 64)->nullable(); + $table->integer('code_10')->nullable(); + $table->integer('page_num')->nullable(); + $table->integer('old_page_num')->nullable(); + }); + } + + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('avbook_javlib_genre'); + } + +} diff --git a/database/migrations/2019_07_02_090723_create_avbook_javlib_movie_table.php b/database/migrations/2019_07_02_090723_create_avbook_javlib_movie_table.php new file mode 100644 index 0000000..11fdd00 --- /dev/null +++ b/database/migrations/2019_07_02_090723_create_avbook_javlib_movie_table.php @@ -0,0 +1,50 @@ +bigInteger('code_10')->nullable(); + $table->string('code_36', 12)->default('0')->primary(); + $table->string('censored_id', 64)->nullable()->default('')->index('censored_id')->comment('識別碼'); + $table->string('movie_title', 512)->nullable(); + $table->string('movie_pic_cover', 128)->nullable()->comment('替换 域名 https://us.netcdn.space/'); + $table->string('release_date', 16)->nullable()->default('0000-00-00')->comment('發行日期'); + $table->string('movie_length', 32)->nullable()->comment('長度'); + $table->string('Director', 12)->nullable()->comment('導演'); + $table->string('Studio', 12)->nullable()->comment('製作商'); + $table->string('Label', 12)->nullable()->comment('發行商'); + $table->string('Series', 256)->nullable()->comment('系列'); + $table->string('Genre', 256)->nullable()->comment('類別'); + $table->string('JAV_Idols', 256)->nullable()->comment('演員'); + $table->string('sample_dmm', 8192)->nullable(); + $table->float('score', 4)->nullable(); + $table->integer('userswanted')->nullable(); + $table->integer('userswatched')->nullable(); + $table->integer('usersowned')->nullable(); + $table->boolean('comments')->nullable(); + }); + } + + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('avbook_javlib_movie'); + } + +} diff --git a/database/migrations/2019_07_02_090723_create_avbook_javlib_vid_table.php b/database/migrations/2019_07_02_090723_create_avbook_javlib_vid_table.php new file mode 100644 index 0000000..52c1533 --- /dev/null +++ b/database/migrations/2019_07_02_090723_create_avbook_javlib_vid_table.php @@ -0,0 +1,32 @@ +string('vid', 12)->primary(); + }); + } + + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('avbook_javlib_vid'); + } + +} diff --git a/package-lock.json b/package-lock.json index 004806a..f3e9b36 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1345,13 +1345,45 @@ } }, "axios": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz", - "integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=", + "version": "0.18.1", + "resolved": "https://registry.npm.taobao.org/axios/download/axios-0.18.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Faxios%2Fdownload%2Faxios-0.18.1.tgz", + "integrity": "sha1-/z8N4ue10YDnV62YAA8Qgbh7zqM=", "dev": true, "requires": { - "follow-redirects": "^1.3.0", - "is-buffer": "^1.1.5" + "follow-redirects": "1.5.10", + "is-buffer": "^2.0.2" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "http://registry.npm.taobao.org/debug/download/debug-3.1.0.tgz?cache=0&other_urls=http%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-3.1.0.tgz", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "follow-redirects": { + "version": "1.5.10", + "resolved": "http://registry.npm.taobao.org/follow-redirects/download/follow-redirects-1.5.10.tgz", + "integrity": "sha1-e3qfmuov3/NnhqlP9kPtB/T/Xio=", + "dev": true, + "requires": { + "debug": "=3.1.0" + } + }, + "is-buffer": { + "version": "2.0.3", + "resolved": "http://registry.npm.taobao.org/is-buffer/download/is-buffer-2.0.3.tgz", + "integrity": "sha1-Ts8/z3ScvR5HJonhCaxmJhol5yU=", + "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } } }, "babel-code-frame": { diff --git a/package.json b/package.json index 285dc0d..658a4ed 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" }, "devDependencies": { - "axios": "^0.18", + "axios": "^0.18.1", "bootstrap": "^4.0.0", "cross-env": "^5.1", "jquery": "^3.2", diff --git a/resources/code_36/avbook_avmoo_end_code_36_director.txt b/resources/code_36/avbook_avmoo_end_code_36_director.txt index 339cae8..2c2d46e 100644 --- a/resources/code_36/avbook_avmoo_end_code_36_director.txt +++ b/resources/code_36/avbook_avmoo_end_code_36_director.txt @@ -1 +1 @@ -3tn \ No newline at end of file +3ve \ No newline at end of file diff --git a/resources/code_36/avbook_avmoo_end_code_36_label.txt b/resources/code_36/avbook_avmoo_end_code_36_label.txt index 5411d6e..50f9766 100644 --- a/resources/code_36/avbook_avmoo_end_code_36_label.txt +++ b/resources/code_36/avbook_avmoo_end_code_36_label.txt @@ -1 +1 @@ -6z2 \ No newline at end of file +70b \ No newline at end of file diff --git a/resources/code_36/avbook_avmoo_end_code_36_movie.txt b/resources/code_36/avbook_avmoo_end_code_36_movie.txt index fce16e5..ec528a1 100644 --- a/resources/code_36/avbook_avmoo_end_code_36_movie.txt +++ b/resources/code_36/avbook_avmoo_end_code_36_movie.txt @@ -1 +1 @@ -74o2 \ No newline at end of file +77cz \ No newline at end of file diff --git a/resources/code_36/avbook_avmoo_end_code_36_series.txt b/resources/code_36/avbook_avmoo_end_code_36_series.txt index d3a183e..2b242c5 100644 --- a/resources/code_36/avbook_avmoo_end_code_36_series.txt +++ b/resources/code_36/avbook_avmoo_end_code_36_series.txt @@ -1 +1 @@ -pjj \ No newline at end of file +prt \ No newline at end of file diff --git a/resources/code_36/avbook_avmoo_end_code_36_star.txt b/resources/code_36/avbook_avmoo_end_code_36_star.txt index 587415e..c55cf8d 100644 --- a/resources/code_36/avbook_avmoo_end_code_36_star.txt +++ b/resources/code_36/avbook_avmoo_end_code_36_star.txt @@ -1 +1 @@ -u2u \ No newline at end of file +u9k \ No newline at end of file diff --git a/resources/code_36/avbook_avmoo_end_code_36_studio.txt b/resources/code_36/avbook_avmoo_end_code_36_studio.txt index be6b303..7b12630 100644 --- a/resources/code_36/avbook_avmoo_end_code_36_studio.txt +++ b/resources/code_36/avbook_avmoo_end_code_36_studio.txt @@ -1 +1 @@ -3in \ No newline at end of file +3j4 \ No newline at end of file diff --git a/resources/t2.torrent b/resources/t2.torrent new file mode 100644 index 0000000..c2384cb Binary files /dev/null and b/resources/t2.torrent differ diff --git a/resources/t3.torrent b/resources/t3.torrent new file mode 100644 index 0000000..f357125 Binary files /dev/null and b/resources/t3.torrent differ diff --git a/resources/test.torrent b/resources/test.torrent new file mode 100644 index 0000000..823317a Binary files /dev/null and b/resources/test.torrent differ diff --git a/resources/views/itemtag.blade.php b/resources/views/itemtag.blade.php new file mode 100644 index 0000000..9eb95d4 --- /dev/null +++ b/resources/views/itemtag.blade.php @@ -0,0 +1,40 @@ + + + + + + + +0): ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/views/layout_censored.blade.php b/resources/views/layout_censored.blade.php index 108ff1d..d8afd0f 100644 --- a/resources/views/layout_censored.blade.php +++ b/resources/views/layout_censored.blade.php @@ -122,92 +122,36 @@ class="" data-toggle="" data-hover="dropdown" role="button" aria-expanded="false - - +
diff --git a/resources/views/layout_header.blade.php b/resources/views/layout_header.blade.php index d5ac5ce..4a4ff3c 100644 --- a/resources/views/layout_header.blade.php +++ b/resources/views/layout_header.blade.php @@ -67,6 +67,7 @@ class="glyphicon glyphicon-menu-hamburger">
  • 高清
  • 字幕
  • +
  • javlibrary 高评价
  • diff --git a/resources/views/layout_javlib.blade.php b/resources/views/layout_javlib.blade.php new file mode 100644 index 0000000..c8e3243 --- /dev/null +++ b/resources/views/layout_javlib.blade.php @@ -0,0 +1,180 @@ +@extends('layout') +@section('title', ($title?$title:"AvBook javlibrary - 高评价").' - 第'.($_GET['page'] ?? 1).'页') +@section('navbar_right') + + + + + +@endsection + +@section('content') + + + + +
    +
    + + +
    + + +
    +
    +
    + +
    +
    + +

    生日: {{$res_star['star_birthday']}}

    +

    年龄:

    +

    身高: cm

    +

    罩杯:

    +

    胸围: cm

    +

    腰围: cm

    +

    臀围: cm

    +

    出生地:

    +

    爱好:

    +

    + 独自演出作品

    +

    + + +
    +
    +
    + + + + + + + +
    +
    +
    + + + + +@endsection \ No newline at end of file diff --git a/resources/views/layout_javlibmovie.blade.php b/resources/views/layout_javlibmovie.blade.php new file mode 100644 index 0000000..be96fab --- /dev/null +++ b/resources/views/layout_javlibmovie.blade.php @@ -0,0 +1,641 @@ +@extends('layout') +@section('title', $movie_info['censored_id'].$movie_info['movie_title']) +@section('content') + + + + + +{{----}} +{{----}} +{{----}} + + + + + + +
    + + + + + + +
    + + + + + + + + + +
    +
    s...
    +
    + +
    +
    +
    + + +
    + + {{--

    + + +

    --}} + @include('itemtag', ['movie_info' => $movie_info]) + 已拥有'; } echo $sh .mb_substr( $movie_info['movie_title'], 0, 70) ?> +
    +
    + + + +
    +
    + +

    识别码: + +

    +

    + 上一页 | 下一页 +     +

    +

    + +

    + +

    磁力搜索:

    +

    +

    javbus:

    +

    +

    avmoo:

    +

    + + @if ($movie_info['release_date']) + 发行时间: + @endif + @if ( $movie_info['movie_length']) + 长度:分钟

    + @endif +

    + @if ($movie_info['Director']) +

    导演:

    + @endif + + @if ($movie_info['Studio']) +

    制作商:

    + @endif + @if ($movie_info['Label']) +

    发行商:

    + @endif + + + + @if ($movie_info['Series']) + +

    系列:

    + @endif + + + + +

    + 类别: + + + + + $val): ?> + + + +

    + + +

    + 修改类别: + $val): ?> + " + + onclick="change_genre(this,'{{$key}}')" >{{$val}} + + + + +

    + +

    + +

    + +

    + 修改状态: + ['想要的','(没有资源 有资源无法下载)'],'watched'=>['已看过',''],'owned'=>['已拥有',''] ]; foreach($state_config as $key=>$val): ?> + " + + onclick="change_state('{{$key}}','{{$newstate}}',this)" >{{$val[0]}} + + + {{$movie_info['visited']}} + + + +

    + + + +

    + 演員: + +

    + +
      + + + $val): ?> + + + + + 暫無出演者資訊 + +
    + +

    + $val): ?> + + + + +

    + + + +
    +
    + + {{--

    樣品圖像

    --}} + + +
    + $val): ?> + + +
    + +
    + +
    + + +
    + + + [已有文件]'; } echo $sh .$movie_info['censored_id'].' '. $movie_info['movie_title'] ?> + + + + +

    磁力連結投稿 + 已拥有 + + + + + + +

    +
    +
    ×
    +
    +
    +
    magnet地址:
    + +
    +
    + +
    + + +
    + + + + + + + +
    磁力名稱 檔案大小分享日期
    + + + + +
    +
    + +
    + + +
    + + +
    +

    演員

    + + +
    + + +
    + + +

    同類影片

    + + +
    +

    +
    + + + +
    + + + +@endsection \ No newline at end of file diff --git a/resources/views/layout_movie.blade.php b/resources/views/layout_movie.blade.php index 4873880..3cf5176 100644 --- a/resources/views/layout_movie.blade.php +++ b/resources/views/layout_movie.blade.php @@ -62,7 +62,7 @@
    --}} + @include('itemtag', ['movie_info' => $movie_info]) 已拥有'; } echo $sh .mb_substr( $movie_info['movie_title'], 0, 70) ?>
    @@ -106,11 +107,41 @@

    磁力搜索:

    -

    +

    javbus:

    -

    + +

    avmoo:

    -

    + +

    javlibrary: +

    + + +

    预告片: + + + "> + + "> +

    + @if ($movie_info['release_date']) 发行时间: @@ -409,7 +440,7 @@ >
    - + @include('itemtag', ['movie_info' => $val])
    diff --git a/routes/web.php b/routes/web.php index 9611f37..f08e925 100644 --- a/routes/web.php +++ b/routes/web.php @@ -22,4 +22,7 @@ Route::get('genre', 'AvbookController@genre'); -Route::get('actresses', 'AvbookController@actresses'); \ No newline at end of file +Route::get('actresses', 'AvbookController@actresses'); + +Route::get('javlib', 'AvbookController@javlib'); +Route::get('javlibmovie', 'AvbookController@javlibmovie'); \ No newline at end of file