update for new APIs

This commit is contained in:
Jon McClure 2022-11-30 14:47:20 +00:00
parent 353f582254
commit ea8c515a7d
2 changed files with 4 additions and 4 deletions

View file

@ -27,11 +27,11 @@
const response = await fetch(
'https://www.reuters.com/site-api/footer/?' +
new URLSearchParams({
website: 'reuters',
_website: 'reuters',
outputType: 'json',
})
);
const footerData = (await response.json())[2];
const footerData = await response.json();
// Dumb verification...
if (!footerData[0].company_description) return;
data = footerData;

View file

@ -21,11 +21,11 @@
const response = await fetch(
'https://www.reuters.com/site-api/header/?' +
new URLSearchParams({
website: 'reuters',
_website: 'reuters',
outputType: 'json',
})
);
const headerData = (await response.json())[0];
const headerData = await response.json();
// Dumb verification...
if (!headerData[0].sections) return;
data = headerData;