update for new APIs
This commit is contained in:
parent
353f582254
commit
ea8c515a7d
2 changed files with 4 additions and 4 deletions
|
|
@ -27,11 +27,11 @@
|
||||||
const response = await fetch(
|
const response = await fetch(
|
||||||
'https://www.reuters.com/site-api/footer/?' +
|
'https://www.reuters.com/site-api/footer/?' +
|
||||||
new URLSearchParams({
|
new URLSearchParams({
|
||||||
website: 'reuters',
|
_website: 'reuters',
|
||||||
outputType: 'json',
|
outputType: 'json',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
const footerData = (await response.json())[2];
|
const footerData = await response.json();
|
||||||
// Dumb verification...
|
// Dumb verification...
|
||||||
if (!footerData[0].company_description) return;
|
if (!footerData[0].company_description) return;
|
||||||
data = footerData;
|
data = footerData;
|
||||||
|
|
|
||||||
|
|
@ -21,11 +21,11 @@
|
||||||
const response = await fetch(
|
const response = await fetch(
|
||||||
'https://www.reuters.com/site-api/header/?' +
|
'https://www.reuters.com/site-api/header/?' +
|
||||||
new URLSearchParams({
|
new URLSearchParams({
|
||||||
website: 'reuters',
|
_website: 'reuters',
|
||||||
outputType: 'json',
|
outputType: 'json',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
const headerData = (await response.json())[0];
|
const headerData = await response.json();
|
||||||
// Dumb verification...
|
// Dumb verification...
|
||||||
if (!headerData[0].sections) return;
|
if (!headerData[0].sections) return;
|
||||||
data = headerData;
|
data = headerData;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue