diff --git a/src/scrapers/gamma.js b/src/scrapers/gamma.js index 118a7639..c020f131 100755 --- a/src/scrapers/gamma.js +++ b/src/scrapers/gamma.js @@ -922,6 +922,8 @@ function scrapeApiProfile(data, releases, siteSlug) { if (releases) profile.releases = releases.map((release) => `https://${siteSlug}.com/en/video/${release.url_title}/${release.clip_id}`); + console.log(profile); + return profile; } @@ -956,8 +958,6 @@ async function fetchApiProfile({ name: actorName }, context, include) { encodeJSON: true, }); - console.log(res.status, res.body.results[0].hits[0]); - if (res.status === 200 && res.body.results[0].hits.length > 0) { const actorData = res.body.results[0].hits.find((actor) => slugify(actor.name) === slugify(actorName)); diff --git a/tests/profiles.js b/tests/profiles.js index 9c992369..0c6d3ee3 100644 --- a/tests/profiles.js +++ b/tests/profiles.js @@ -329,7 +329,8 @@ const validators = { // profiler in this context is shorthand for profile scraper async function init() { - const entitiesBySlug = await fetchEntitiesBySlug(Object.keys(actorScrapers), { types: ['channel', 'network', 'info'], prefer: 'channel' }); + // Pride Studios needs prefer network, probably works bests for most Gamma sites. Establish which scrapers need channel and why. + const entitiesBySlug = await fetchEntitiesBySlug(Object.keys(actorScrapers), { types: ['channel', 'network', 'info'], prefer: 'network' }); await Object.entries(actorScrapers).reduce(async (chain, [entitySlug, scraper]) => { await chain;