Merge branch 'main' of https://gitea.o2o.kr/castad/o2o-castad-backend
This commit is contained in:
commit
d40e2bd430
26 files changed
+965
-884
No files matched your search
@@ -24,8 +24,8 @@ from app.home.schemas.home_schema import (
|
||||
ImageUploadResponse,
|
||||
ImageUploadResultItem,
|
||||
ImageUrlItem,
|
||||
MarketingAnalysis,
|
||||
ProcessedInfo,
|
||||
# MarketingAnalysis,
|
||||
)
|
||||
from app.home.services.naver_search import naver_search_client
|
||||
from app.utils.upload_blob_as_request import AzureBlobUploader
|
||||
@@ -303,33 +303,11 @@ async def _crawling_logic(url:str):
|
||||
# marketing_analysis = MarketingAnalysis(**parsed)
|
||||
|
||||
logger.debug(
|
||||
f"[crawling] structured_report 구조 확인:\n"
|
||||
f"{'='*60}\n"
|
||||
f"[report] type: {type(structured_report.get('report'))}\n"
|
||||
f"{'-'*60}\n"
|
||||
f"{structured_report.get('report')}\n"
|
||||
f"{'='*60}\n"
|
||||
f"[tags] type: {type(structured_report.get('tags'))}\n"
|
||||
f"{'-'*60}\n"
|
||||
f"{structured_report.get('tags')}\n"
|
||||
f"{'='*60}\n"
|
||||
f"[selling_points] type: {type(structured_report.get('selling_points'))}\n"
|
||||
f"{'-'*60}\n"
|
||||
f"{structured_report.get('selling_points')}\n"
|
||||
f"{'='*60}"
|
||||
f"structured_report = {structured_report.model_dump()}"
|
||||
)
|
||||
|
||||
marketing_analysis = MarketingAnalysis(
|
||||
report=structured_report["report"],
|
||||
tags=structured_report["tags"],
|
||||
facilities=list(
|
||||
[sp["keywords"] for sp in structured_report["selling_points"]]
|
||||
), # [json.dumps(structured_report["selling_points"])] # 나중에 Selling Points로 변수와 데이터구조 변경할 것
|
||||
)
|
||||
# Selling Points 구조
|
||||
# print(sp['category'])
|
||||
# print(sp['keywords'])
|
||||
# print(sp['description'])
|
||||
marketing_analysis = structured_report
|
||||
|
||||
step3_4_elapsed = (time.perf_counter() - step3_4_start) * 1000
|
||||
logger.debug(
|
||||
f"[crawling] Step 3-4: 응답 파싱 완료 ({step3_4_elapsed:.1f}ms)"
|
||||
|
||||
Reference in new issue
Block a user