JSON-LD 의 ProductGroup 을 인식해 상품명을 상품명 필드에서 가져온다 - #54
Merged
Conversation
- Shopify 계열은 최상위가 ProductGroup 이고 실제 Product 는 hasVariant 안에 있어 노드 수집이 전부 미스했다. OG 경로도 표준 가격 태그가 없어 함께 미스해 매 요청이 LLM 으로 갔고, 비결정적이라 같은 사이트의 상품명이 요청마다 갈렸다 - 처음엔 OG 경로에 og:price 폴백을 넣어 푸는 방향으로 갔으나(#51, PR #52) 그 경로는 상품명을 og:title 즉 페이지 제목에서 가져온다. 사이트가 상품명 필드에 선언한 이름은 "컷아웃 부츠" 이고 그쪽이 정확해, JSON-LD 를 고치는 방향으로 전환하고 폴백은 폐기했다 - 변형을 상품 노드로 수집하지 않고 그룹 노드만 수집한다. 변형 이름에는 사이즈가 붙어 있어(컷아웃 부츠 - 250) 상품명으로 쓸 수 없다. 대신 그룹에 없는 가격·이미지만 첫 변형에서 보강한다 - 실측한 페이지의 ProductGroup 에는 offers 도 image 도 없었다 - 저장해둔 실제 페이지로 전후를 확인했다. 수정 전 MISSING_FIELD, 수정 후 컷아웃 부츠 / 800,000 KRW / https 이미지
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Situation
ProductGroup이라 상품 노드 수집에 안 걸리고, 실제 상품은hasVariant배열 안에 있는데 재귀가 그 키를 보지 않는다. OG 경로도 표준 가격 태그가 없어 함께 미스한다.source=SERVER_LLM이었고 이름이 세 갈래로 나왔다.og:title을 그대로 베낀 영어Stream Pants (Archive) - Charcoal러너 자켓 (Archive) 차콜차콜·스노우 블랙은 페이지에 없는 값 (본문 검색 0건)러너 자켓 (Archive)\n \n 차콜Task
og:title)인가, 사이트가 상품명 필드에 선언한 이름(JSON-LDname)인가.Action
접근 전환
처음에는 OG 경로에
og:price폴백을 넣어 푸는 방향으로 갔다 (이슈 #51, PR #52). 가격 한 필드만 채우면 OG 경로가 완결되므로 변경이 가장 작았다.전환한 이유는 그 경로가 상품명을
og:title에서 가져오기 때문이다.og:title은 페이지 제목이라 사이트명·프로모션 문구가 섞이는 자리다. 이 사이트의 상품명 필드에는컷아웃 부츠가 선언돼 있고, 그쪽이 정확하다. 지금 영어 제목이 나오는 것은 파서가ProductGroup을 못 읽어 OG 로 흘러내린 결과지 의도한 선택이 아니었다.og:price폴백 (PR #52, 폐기)ProductGroup인식 (이 PR)og:title(페이지 제목)name(상품명 필드)Cut Out Boots (2026) - Black컷아웃 부츠두 안 모두 대상 사이트를 파서로 내리지만, JSON-LD 가 우선순위상 먼저이므로 이 PR 이 들어가면
og:price폴백은 실행되지 않는 경로가 된다. 그래서 #51 과 PR #52 는 닫았다.구현
ProductGroup을 상품 노드로 인정한다. 타입 판정에ProductGroup을 더했다.hasVariant를 재귀 대상에 넣지 않았다. 변형 이름에는 사이즈가 붙어 있어(컷아웃 부츠 - 250) 상품명으로 쓸 수 없다.ProductGroup에는offers도image도 없고 둘 다 변형 안에만 있었다. 그룹이 자기offers를 갖고 있으면 그쪽을 먼저 쓴다.실측
postarchivefaction.com, 2026-08-26, extractor 와 같은
Accept-Language로 fetch. 상품 90건 중 10건 표본:ProductGroupoffers.priceproduct:price:amountResult
컷아웃 부츠로 같은 이름이 된다. 색상은 JSON-LD 어디에도 없고(그룹·변형 어느 노드에도color키가 없다) Shopify 상품 자체가 갈려 URL 로만 구분된다. 상품명 필드가 그렇게 선언돼 있으므로 정확한 값이다. 토너먼트에서 같은 이름의 항목을 어떻게 구분해 보여줄지는 상품명 출처와 별개 문제로 남는다.offers우선, 변형 부재 시 사유 분류)에 더해 저장해둔 실제 페이지 두 장을 파서에 통과시켜 전후를 확인했다. 수정 전에는MISSING_FIELD(즉 LLM 으로 감), 수정 후에는컷아웃 부츠/ 800,000 KRW /https이미지가 나온다. 단위 테스트 3건 모두 수정을 임시로 되돌리면 FAIL 하는 것까지 확인했다.연관 이슈