Improved actor scraping and display.

This commit is contained in:
2020-05-18 01:22:56 +02:00
parent af5543190a
commit 8733fdc657
28 changed files with 1033 additions and 793 deletions

View File

@@ -252,9 +252,13 @@ async function fetchProfile(actorName) {
}, { encodeJSON: true });
if (res.ok) {
const actor = res.body.hits.hits.find(hit => hit._source.name === actorName);
const actor = res.body.hits.hits.find(hit => hit._source.name.toLowerCase() === actorName.toLowerCase());
return scrapeProfile(actor._source);
if (actor) {
return scrapeProfile(actor._source);
}
return null;
}
return res.status;