diff --git a/api.php b/api.php index 48c224d..33049f0 100644 --- a/api.php +++ b/api.php @@ -116,33 +116,93 @@ function emptyPhysicalResult() { ]; } -// ── SCRAPPING FNAC (CORRECTION v2 : vérification EAN anti-faux-positif) ── +// ── NOUVELLE FONCTION : SCRAPPING GO-UPC.COM ── +function fetchFromGoUpc($ean) { + $empty = emptyPhysicalResult(); + $url = "https://go-upc.com/search?q=" . urlencode($ean); + $html = httpGet($url, 15); + if (!$html) return $empty; + + // Recherche du titre dans les résultats + if (preg_match('/