<aside> 🕷 크롤러 인터페이스 · HTTP 클라이언트 · 국가별 소스 · 파싱 전략 · Anti-bot · 잡 스케줄링 · 저장 / 중복 제거 · 원본: .claude/rules/02-crawler-implementation.md

</aside>

핵심 Crawler 인터페이스

모든 크롤러가 만족해야 하는 base 인터페이스. context 취소 / per-source rate limit / 명시적 lifecycle 강제.

type Crawler interface {
    Name() string
    Source() SourceInfo

    Initialize(ctx context.Context, config Config) error
    Start(ctx context.Context) error
    Stop(ctx context.Context) error

    Fetch(ctx context.Context, target Target) (*RawContent, error)
    HealthCheck(ctx context.Context) error
}

type SourceInfo struct {
    Country  string  // ISO 3166-1 alpha-2 (US, KR)
    Type     SourceType
    Name     string
    BaseURL  string
    Language string  // ISO 639-1
}

HTTP 클라이언트 표준

국가별 소스 (우선순위 순)

🇺🇸 US

🇰🇷 KR

파싱 전략