sync: update from private repo (5b6df2f)
CI / build-and-test (push) Has been cancelled

This commit is contained in:
oss-sync
2026-06-10 08:40:41 +00:00
parent dfc5950117
commit 5502478636
43 changed files with 6452 additions and 18 deletions
+3 -2
View File
@@ -85,8 +85,9 @@ function parseProducts(html: string, maxResults: number): AmazonProduct[] {
}
// Extract rating: <span class="a-icon-alt">5つ星のうち4.5</span>
const ratingMatch = block.match(/<span class="a-icon-alt">([\d.]+つ星のうち[\d.]+)<\/span>/i)
|| block.match(/(\d+(?:\.\d+)?)\s*つ星のうち/i);
// The actual rating is the number AFTER のうち; the one before is the scale.
const ratingMatch = block.match(/<span class="a-icon-alt">[\d.]+つ星のうち([\d.]+)<\/span>/i)
|| block.match(/つ星のうち\s*(\d+(?:\.\d+)?)/i);
if (ratingMatch) {
const rVal = ratingMatch[1].match(/(\d+(?:\.\d+)?)/);
if (rVal) product.rating = rVal[1];