Customer Rating and review changes
This commit is contained in:
@@ -24,6 +24,11 @@ class BrandRef:
|
||||
aliases: tuple
|
||||
sub_brands: tuple
|
||||
official: tuple
|
||||
# Brand-store path whose product pages publish real customer reviews as
|
||||
# schema.org data (e.g. "samsung.com/in"); None when no free source exists.
|
||||
reviews_site: Optional[str] = None
|
||||
# Regex a reviews_site URL must match to be a single-variant product page.
|
||||
reviews_product_url: Optional[str] = None
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
@@ -78,6 +83,8 @@ def load_reference() -> Reference:
|
||||
aliases=tuple(a.lower() for a in b.get("aliases", [])),
|
||||
sub_brands=tuple(s.lower() for s in b.get("sub_brands", [])),
|
||||
official=tuple(b.get("official", [])),
|
||||
reviews_site=b.get("reviews_site"),
|
||||
reviews_product_url=b.get("reviews_product_url"),
|
||||
)
|
||||
categories = {
|
||||
c["slug"]: CategoryRef(c["slug"], c["name"], tuple(c.get("search_terms", [])),
|
||||
|
||||
@@ -7,11 +7,19 @@
|
||||
# parent, and are kept as the product family.
|
||||
# official the brand's own Indian web domains. A product page on one of
|
||||
# these is the strongest evidence that a product exists.
|
||||
# reviews_site optional brand-store path whose product pages publish real
|
||||
# customer ratings + reviews as schema.org JSON-LD, robots-allowed
|
||||
# (checked 2026-10-01). `cli reviews` finds each verified product's
|
||||
# page there. Add a brand only after checking its pages.
|
||||
# reviews_product_url regex for that store's single-variant product pages
|
||||
# (family/marketing pages carry no product data or reviews).
|
||||
brands:
|
||||
- name: Samsung
|
||||
categories: [mobiles, laptops]
|
||||
aliases: [samsung]
|
||||
official: [samsung.com]
|
||||
reviews_site: samsung.com/in
|
||||
reviews_product_url: '-sm-[a-z0-9]+/?$' # .../galaxy-a56-5g-awesome-olive-256gb-sm-a566ezggins/
|
||||
- name: Apple
|
||||
categories: [mobiles, laptops]
|
||||
aliases: [apple]
|
||||
|
||||
Reference in New Issue
Block a user