feat(generator): AI브리핑 폴링 안정화 + 리뷰 요약 폴백 + 브랜드 로고 (shorts_all 동기화)

- naver.py: AI 브리핑이 하단 lazy-load 되는 특성 반영 — 섹션을 뷰에 올려
  본문 불릿이 실제 로드될 때까지 스크롤·폴링(간헐 빈결과 수정).
  리뷰 크롤·요약 함수(fetch_reviews/summarize_reviews) 추가.
- main.py(3): AI 브리핑이 없는 가게는 방문자 리뷰를 긁어 Gemini로 요약해
  소재로 사용하는 폴백 추가.
- 각 엔진 fonts/brand_logo.png 추가(상단 밴드 제목 옆 로고 — 렌더에 필요).
- emile 잔여물(generator/data/emile_*) 제거.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
JinwooKimandClaude Opus 4.8 committed 2026-07-15 09:08:56 +09:00
1 parent f24818860b
commit cb7c463f98
7 files changed
+219 -17

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

+17 -3
View File
@@ -137,10 +137,24 @@ def main():
except Exception as e:
sys.exit(f"[!] AI 브리핑 수집 실패: {type(e).__name__}: {e}")
if not bullets:
sys.exit(f"[!] '{brief_store or '이 가게'}'에 AI 브리핑이 없어요. "
"키워드를 직접 주거나, 브리핑 있는 가게 링크를 쓰세요.")
# AI 브리핑이 없으면 → 방문자 리뷰를 '더보기'까지 펼쳐 긁은 뒤 Gemini 로 요약(브리핑 대체)
print(f"■ '{brief_store or '이 가게'}' AI 브리핑 없음 → 방문자 리뷰 크롤링 후 요약...")
_key = args.api_key or os.getenv("GEMINI_API_KEY") or os.getenv("GOOGLE_API_KEY")
if not _key:
sys.exit("[!] 리뷰 요약에 API 키 필요. setx GEMINI_API_KEY \"키\" 후 새 터미널, 또는 --api-key.")
try:
rstore, reviews = NV.fetch_reviews(args.link, max_reviews=30)
except Exception as e:
sys.exit(f"[!] 리뷰 수집 실패: {type(e).__name__}: {e}")
if rstore and not brief_store:
brief_store = rstore
bullets = NV.summarize_reviews(genai.Client(api_key=_key), brief_store, reviews)
if not bullets:
sys.exit(f"[!] '{brief_store or '이 가게'}'는 AI 브리핑도 리뷰도 못 얻었어요. "
"키워드를 직접 주거나 다른 링크를 쓰세요.")
print(f"■ 리뷰 {len(reviews)}개 수집 → 요약 {len(bullets)}줄 (브리핑 대체)")
product = " ".join(bullets)
print(f"■ 가게: {brief_store or '?'} / 브리핑 {len(bullets)}줄 → 키워드로 사용")
print(f"■ 가게: {brief_store or '?'} / 소재 {len(bullets)}줄 → 키워드로 사용")
for b in bullets:
print(f" • {b}")
if not product: