fix(insta-lab): trend_collector — Google Trends RSS + seed placeholder filter

(1) pytrends 4.x가 Google API 변경으로 trending_searches(pn='south_korea')
가 404 반환 → daily trending searches RSS endpoint를 requests로 직접 호출
하도록 교체. pytrends 의존성 제거.

(2) category_seeds 프롬프트 템플릿에 placeholder ('...', 'TBD' 등) 또는
2자 미만 값이 들어가면 NAVER가 400 Bad Request 반환 → _seeds_for에
_is_valid_seed 가드 추가, 모두 invalid면 DEFAULT_CATEGORY_SEEDS 폴백.

테스트 8/8 PASS (기존 6 + placeholder/fallback 2 신규).
This commit is contained in:
2026-05-17 09:21:38 +09:00
parent ad6c744f2c
commit bf5897fc85
3 changed files with 98 additions and 36 deletions

View File

@@ -7,4 +7,3 @@ jinja2>=3.1.4
playwright==1.48.0
pytest>=8.0
pytest-asyncio>=0.24
pytrends>=4.9