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(
|
||||
'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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue