diff --git a/app/Controllers/CLI/Crawler.php b/app/Controllers/CLI/Crawler.php index 1900e61..df406a0 100644 --- a/app/Controllers/CLI/Crawler.php +++ b/app/Controllers/CLI/Crawler.php @@ -21,7 +21,7 @@ class Crawler extends BaseController throw new \Exception("Target Links가 없습니다."); } //2. TargetPage : div.contents 가진 객체를 찾아서 첫번쨰 요소에서만 참조 - $url = !in_array("debug", $params) ? getenv("yamap.url.test") : $links[0]["href"]; + $url = $isDebug ? getenv("yamap.url.test") : $links[0]["href"]; $crawler = $library->getCrawlerByDetailPage($url); //3. Image $library->getImages($crawler);