Changed profile test to prefer network. Removed stray console from Gamma.
This commit is contained in:
@@ -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}`);
|
if (releases) profile.releases = releases.map((release) => `https://${siteSlug}.com/en/video/${release.url_title}/${release.clip_id}`);
|
||||||
|
|
||||||
|
console.log(profile);
|
||||||
|
|
||||||
return profile;
|
return profile;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -956,8 +958,6 @@ async function fetchApiProfile({ name: actorName }, context, include) {
|
|||||||
encodeJSON: true,
|
encodeJSON: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(res.status, res.body.results[0].hits[0]);
|
|
||||||
|
|
||||||
if (res.status === 200 && res.body.results[0].hits.length > 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));
|
const actorData = res.body.results[0].hits.find((actor) => slugify(actor.name) === slugify(actorName));
|
||||||
|
|
||||||
|
|||||||
@@ -329,7 +329,8 @@ const validators = {
|
|||||||
|
|
||||||
// profiler in this context is shorthand for profile scraper
|
// profiler in this context is shorthand for profile scraper
|
||||||
async function init() {
|
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 Object.entries(actorScrapers).reduce(async (chain, [entitySlug, scraper]) => {
|
||||||
await chain;
|
await chain;
|
||||||
|
|||||||
Reference in New Issue
Block a user