Automation init...3

This commit is contained in:
최준흠 2024-09-10 11:31:40 +09:00
parent 07bf39944a
commit ccbe3ba17b

View File

@ -34,11 +34,8 @@ class YamapController extends CommonController
if (!count($items)) {
throw new \Exception("Yamap 사이트에서 게시물이 존재하지 않습니다.");
}
$max_limit = intval(getenv("yamap.list.item.max_limit"));
$max_limit = count($items) <= $max_limit ? $items : $max_limit;
$i = 0;
foreach ($items as $item) {
if ($i <= $max_limit) {
try {
//3. DetailPage 처리 : bbs_view > div.contents 가진 객체를 찾아서 처리
$fileEntitys = $crawler->detailPage($item["detail_url"]);
@ -52,7 +49,6 @@ class YamapController extends CommonController
log_message("debug", $e->getMessage());
}
}
}
log_message("notice", "Crawler->" . __FUNCTION__ . " 작업이 완료되었습니다.");
return "완료되었습니다.";
} catch (\Exception $e) {