diff --git a/app/workers/file_watcher.py b/app/workers/file_watcher.py index e94c0fb..99c7694 100644 --- a/app/workers/file_watcher.py +++ b/app/workers/file_watcher.py @@ -137,6 +137,10 @@ def _canonicalize_url(url: str) -> str: 같은 글의 utm 변형 (`?utm_source=foo`) 과 fragment 변형 (`#section`) 을 한 row 로 수렴시키기 위해 file_hash 산출 전 반드시 거친다. + + ★R11c: news_collector._normalize_url(news 채널)과 의도적으로 다르다 — 이쪽(web_clip)은 + query-sort/trailing-slash/소문자화로 공격적 정규화하지만, news 쪽은 query-식별 사이트의 + 별개 기사 붕괴 방지를 위해 보수적이다. 두 함수 통합 금지(채널별 dedup 의도가 다름). """ if not url: return "" diff --git a/app/workers/news_collector.py b/app/workers/news_collector.py index 59699ae..3a4a6df 100644 --- a/app/workers/news_collector.py +++ b/app/workers/news_collector.py @@ -83,6 +83,10 @@ def _normalize_url(url: str) -> str: query 전체 제거 금지: hada.io/topic?id= · aitimes articleView.html?idxno= · HN item?id= 등 query-식별 사이트에서 별개 기사가 같은 URL 로 붕괴된다. 저장(edit_url)·조회 양쪽이 이 함수를 공유해야 dedup 이 성립. + + ★R11c: file_watcher._canonicalize_url(web_clip 채널)과 의도적으로 다르다 — 이쪽은 콘텐츠 + 식별 query 보존(별개 기사 붕괴 방지)이 핵심이라 query-sort/trailing-slash/소문자화를 안 한다. + 두 함수 통합 금지(news dedup 가 깨짐). 채널별 normalization 은 의도된 설계. """ parsed = urlparse(url) kept = [