feat: 뉴스 자동 수집 시스템 — 6개국 신문 RSS/API
- news_sources 테이블 (소스 관리, UI 동적 제어) - news_collector 워커: RSS(feedparser) + NYT API - 중복 체크: hash(title+date+source) + URL normalize - category 표준화, summary HTML 정제, timezone UTC - 30일 이내만 embed, source별 try/catch - News API: 소스 CRUD + 수동 수집 트리거 - APScheduler: 6시간 간격 자동 수집 - 대상: 경향/아사히/NYT/르몽드/신화/슈피겔 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
16
migrations/012_news_sources.sql
Normal file
16
migrations/012_news_sources.sql
Normal file
@@ -0,0 +1,16 @@
|
||||
-- 뉴스 소스 관리 테이블
|
||||
CREATE TABLE IF NOT EXISTS news_sources (
|
||||
id SERIAL PRIMARY KEY,
|
||||
name VARCHAR(100) NOT NULL,
|
||||
country VARCHAR(10),
|
||||
feed_url TEXT NOT NULL,
|
||||
feed_type VARCHAR(20) DEFAULT 'rss',
|
||||
category VARCHAR(50),
|
||||
language VARCHAR(10),
|
||||
enabled BOOLEAN DEFAULT true,
|
||||
last_fetched_at TIMESTAMPTZ,
|
||||
created_at TIMESTAMPTZ DEFAULT NOW()
|
||||
);
|
||||
|
||||
-- source_channel enum에 'news' 추가
|
||||
ALTER TYPE source_channel ADD VALUE IF NOT EXISTS 'news';
|
||||
Reference in New Issue
Block a user