|
|
@@ -18,8 +18,8 @@ async function fetchIrlFromInsee(year, quarter) {
|
|
|
|
|
|
const xml = await resp.text();
|
|
|
|
|
|
- // SDMX-XML : extraire <generic:ObsValue value="142.06"/>
|
|
|
- const match = xml.match(/ObsValue[^/]*value="([\d.]+)"/);
|
|
|
+ // SDMX-XML : extraire <generic:ObsValue value="142.06"/> OBS_VALUE="144.51"
|
|
|
+ const match = xml.match(/OBS_VALUE="([\d.]+)"/);
|
|
|
if (!match) throw new Error('Valeur IRL introuvable dans la réponse XML');
|
|
|
|
|
|
return parseFloat(match[1]);
|