From c4cbbaf7e7987e9943771b7cf1ec1625a78db80c Mon Sep 17 00:00:00 2001 From: Mina Choi Date: Thu, 4 Jun 2026 22:43:40 +0900 Subject: [PATCH] =?UTF-8?q?website=5Faudit=20=EC=B6=94=EC=B6=9C=20?= =?UTF-8?q?=EC=A0=95=ED=99=95=EB=8F=84=20=EA=B0=9C=EC=84=A0=20+=20Apify=20?= =?UTF-8?q?=EB=B9=88=EA=B0=92=20=EB=B0=A9=EC=96=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - website_parser: anchor-only href 추출로 CDN 노이즈 차단, additional_domains 를 data-lang/서브도메인 prefix 기반 글로벌 사이트 검출로 교체, main_cta 카테고리화 (전화/카톡/예약, fallback 제거) + 최대 3개 제한 - firecrawl: html → rawHtml 로 변경 (script 태그 보존 → 픽셀 검출 정상화) - gemini_vision: logo_colors_hex 최대 5개 → 2개 - branding: 기존 brandAssets 보존하면서 logo_* 머지 (collect_brand_basics 결과 덮어쓰지 않게) - facebook_audit: _page_patch 가 누락 필드 default 값으로 초기화 (Apify 가 페이지 데이터 못 받을 때 schema validation 실패 방어) - schemas: top_videos / bio / linked_domain 옵셔널 처리 (실제 누락 가능 케이스 대응) Co-Authored-By: Claude Opus 4.7 (1M context) --- app/integrations/firecrawl.py | 4 +- app/integrations/llm/gemini_vision.py | 11 +- app/integrations/llm/schemas/report.py | 8 +- app/models/report.py | 8 +- app/services/analysis.py | 5 +- app/services/branding.py | 6 +- app/services/collect.py | 10 +- app/services/facebook_audit.py | 3 +- app/services/website_parser.py | 142 ++++++++++++++++++------- 9 files changed, 134 insertions(+), 63 deletions(-) diff --git a/app/integrations/firecrawl.py b/app/integrations/firecrawl.py index 4aeaa9e..f3313de 100644 --- a/app/integrations/firecrawl.py +++ b/app/integrations/firecrawl.py @@ -74,7 +74,7 @@ class FirecrawlClient: headers=self._headers(), json_body={ "url": url, - "formats": ["json", "links", "html"], + "formats": ["json", "links", "rawHtml"], "jsonOptions": { "prompt": "Extract: clinic name (Korean), clinic name (English), address, phone with dash format, business hours, slogan, services offered, doctors with name/title/specialty, brand identity (primary/accent/background/text colors in hex, heading/body fonts, logo URL from the actual header/main src, og:image from content, favicon URL)", "schema": { @@ -147,7 +147,7 @@ class FirecrawlClient: # "socialMedia": info.get("socialMedia", {}), "branding": info.get("branding", {}), "siteLinks": data.get("links", []), - "html": data.get("html", ""), # raw HTML — collect 단계에서 tracking 추출 후 raw_data 에는 저장 안 함. + "html": data.get("rawHtml", "") or data.get("html", ""), # rawHtml = 가공 전 원본 —