DATA/OTHER/news/webbot_news_striker.php
<?php
// ============================================================
// 타격기 : webbot_news_striker.php
// 받은거 때리고 저장하고 퇴근
// ============================================================

$target_table = 'g5_write_webbot_news_table';

foreach ($news_sources as $source) {

    $site_name    = trim($source['wr_subject']);
    $url          = trim($source['wr_link1']);
    $parsing_type = trim($source['x2_parsing']);
    $korean_name  = trim($source['x2_korean_name']);
    $ca_name      = trim($source['ca_name'] ?? '');
    $keywords_raw = trim($source['x2_ca2']); // 검색어 (콤마 구분)
    $filters_raw  = trim($source['x2_ca3']); // 필터링어 (콤마 구분)

    if (empty($url)) { sleep(1); continue; }

    // 검색어/필터링어 배열화
    $keywords = $keywords_raw ? array_map('trim', explode(',', $keywords_raw)) : [];
    $filters  = $filters_raw  ? array_map('trim', explode(',', $filters_raw))  : [];

    // 파싱 타입별 타격기 분기
    if ($parsing_type === 'RSS') {
        include __DIR__ . '/webbot_news_striker_rss.php';
    } else {
        // RSS 외 파싱은 추후 타격기 추가
        sleep(1);
        continue;
    }

    sleep(2);
}
// 퇴근