Added teaser support. Added Score network with scraper for Scoreland. Improved q. Added assets.

This commit is contained in:
2020-02-02 05:14:58 +01:00
parent 14e5695b6e
commit a97c6defca
52 changed files with 4291 additions and 3435 deletions

View File

@@ -346,7 +346,7 @@ async function scrapeActors(actorNames) {
const profileScrapers = [].concat(source).map(slug => ({ scraperSlug: slug, scraper: scrapers.actors[slug] }));
try {
return profileScrapers.reduce(async (outcome, { scraper, scraperSlug }) => outcome.catch(async () => {
return await profileScrapers.reduce(async (outcome, { scraper, scraperSlug }) => outcome.catch(async () => {
logger.verbose(`Searching '${actorName}' on ${scraperSlug}`);
const profile = await scraper.fetchProfile(actorEntry ? actorEntry.name : actorName, scraperSlug);
@@ -365,7 +365,7 @@ async function scrapeActors(actorNames) {
throw new Error(`Profile for ${actorName} not available on ${scraperSlug}`);
}), Promise.reject(new Error()));
} catch (error) {
logger.error(error);
logger.warn(`Error in scraper ${source}: ${error.message}`);
}
return null;
@@ -418,6 +418,7 @@ async function scrapeActors(actorNames) {
return profile;
} catch (error) {
console.log(error);
logger.warn(`${actorName}: ${error}`);
return null;