//
요즘 화제라는 명품 목걸이
//
// CAT7478 // | 추천 (8) | 조회 (268) //
//
// // // // 2024-09-16 09:52:39 //
//
//
//

//

//

 

//

 

//

전화기선 짤라서 목걸이 만들어도 위화감이 전혀 없을것같은

//

 

//

디자인이군요

//

 

//
//
//
// // //
//
// protected function detail_process(int $cnt, array $listInfo): array { $response = $this->getMySocket()->getContent("/newboard/yamoonboard/" . $listInfo['detail_url']); //작성시간 // $selector = $this->getSelector($response, getenv("yamoon.view.date.tag")); // $listInfo['date'] = trim($selector->text()); // if ($this->isDebug) { // throw new \Exception( // sprintf( // "\n--------------%s Debug--------------\n%s\n%s\n---------------------------------------\n", // __FUNCTION__, // var_export($listInfo, true), // $selector->html() // ) // ); // } //작성내용 $selector = $this->getSelector($response, getenv("yamoon.view.content.tag")); $media_urls = $this->getUrlsByMediaType($selector, "img", "src"); $media_urls = $this->getUrlsByMediaType($selector, "video", "src", $media_urls); if ($this->isDebug) { throw new \Exception(sprintf( "\n--------------%s Debug--------------\n%s%s\n---------------------------------------\n", __FUNCTION__, var_export($listInfo, true), var_export($media_urls, true) )); } else { // Image 나 Video 소스들의 url을 가져와서 실제 다운받는 처리 $storages = $this->media_process($media_urls); if (!count($storages)) { throw new \Exception("등록할 자료가 없습니다."); } $this->backend_process($cnt, $listInfo, $storages); } log_message("notice", __FUNCTION__ . " 작업이 완료되었습니다."); return $listInfo; } //리스트 내용 // // // 졸고 있는 여군 // 6 // yeeyuu | 6 | 369 | No 89372 | 2024-09-13 // public function execute(int $max_limit): void { try { if ($this->isDebug) { $listInfo = []; $listInfo['title'] = 'test_title'; $listInfo['nickname'] = 'test_name'; $listInfo['hit'] = 1; $listInfo['date'] = date("Y-m-d H:i:s"); $listInfo['detail_url'] = getenv("yamoon.view.test.url.{$this->getBoardName()}"); $this->detail_process(1, $listInfo); log_message("notice", __FUNCTION__ . "=> DEBUG 게시물 {$listInfo['detail_url']} 작업종료"); } else { $listInfos = []; $response = $this->getMySocket()->getContent(getenv("yamoon.list.url.{$this->getBoardName()}")); $this->getSelector($response, getenv("yamoon.list.tag"))->each( function (Crawler $node) use (&$listInfos): void { $link_node = $node->filter(getenv("yamoon.list.item.link.tag")); $detail_url = $link_node->attr("href"); $title = $link_node->text(); $info_node = $node->filter(getenv("yamoon.list.item.info.tag")); $infos = explode("|", $info_node->text()); $listInfos[] = ['title' => $title, 'detail_url' => $detail_url, 'nickname' => trim($infos[0]), 'hit' => trim($infos[2]), 'date' => trim($infos[4])]; } ); if (!count($listInfos)) { throw new \Exception("Target URL이 없습니다."); } $this->list_process($max_limit, $listInfos); } log_message("notice", __FUNCTION__ . " 작업이 완료되었습니다."); } catch (\Exception $e) { log_message("warning", sprintf( "\n---%s 오류---\n%s\n-----------------------------------------\n", __FUNCTION__, $e->getMessage() )); } } }