solorpower/crawler/crawlers/__init__.py
haneulai e9a4f8e401 Add 'crawler/' from commit 'c9ed91d885f3c46efb98e98310a1882bb5936546'
git-subtree-dir: crawler
git-subtree-mainline: 8991b92ac8
git-subtree-split: c9ed91d885
2026-06-15 12:53:36 +09:00

21 lines
592 B
Python

# crawlers 패키지 초기화
from .nrems import fetch_data as fetch_nrems
from .kremc import fetch_data as fetch_kremc
from .sun_wms import fetch_data as fetch_sunwms
from .hyundai import fetch_data as fetch_hyundai
from .cmsolar import fetch_data as fetch_cmsolar
# 크롤러 타입별 매핑
CRAWLER_MAP = {
'nrems': fetch_nrems,
'kremc': fetch_kremc,
'sun_wms': fetch_sunwms,
'hyundai': fetch_hyundai,
'cmsolar': fetch_cmsolar
}
def get_crawler(crawler_type):
"""크롤러 타입에 해당하는 fetch 함수 반환"""
return CRAWLER_MAP.get(crawler_type)