_user === null) { $this->_user = new User(); } return $this->_user; } public function yamap(string $category, string $id = "", string $debug = "false"): string { try { $id = $id == "" ? getenv("mangboard.login.default.id") : $id; $password = getenv("mangboard.login.default.password"); //1. 사이트 로그인 처리 $user_entity = $this->getUser()->login(getenv("mangboard.host.url"), $id, $password); //2. 필요한 로그인한 사용자정보,Socket,Storage 정의후 Crawler에게 전달. $crawler = new YamapCrawler(getenv('yamap.host.url'), $category, $user_entity); $crawler->setDebug($debug === "true" ? true : false); $crawler->execute(intval(getenv("yamap.list.max_limit"))); return "완료되었습니다."; } catch (\Exception $e) { log_message("error", $e->getMessage()); return $e->getMessage(); } } public function yamoon(string $category, string $id = "", string $debug = "false"): string { try { $id = $id == "" ? getenv("mangboard.login.default.id") : $id; $password = getenv("mangboard.login.default.password"); //1. 사이트 로그인 처리 $user_entity = $this->getUser()->login(getenv("mangboard.host.url"), $id, $password); //2. 필요한 로그인한 사용자정보,Socket,Storage 정의후 Crawler에게 전달. $crawler = new YamoonCrawler(getenv("yamoon.host.url"), $category, $user_entity); $crawler->setDebug($debug === "true" ? true : false); $crawler->execute(intval(getenv("yamap.list.max_limit"))); return "완료되었습니다."; } catch (\Exception $e) { log_message("error", $e->getMessage()); return $e->getMessage(); } } }