Passing context object with site or network instead of scraper slug and 'site or network' to all profile scrapers.
This commit is contained in:
@@ -136,9 +136,9 @@ async function fetchScene(url, site) {
|
||||
return res.ok ? scrapeScene(res.item, url, site) : res.status;
|
||||
}
|
||||
|
||||
async function fetchProfile(actorName, siteSlug) {
|
||||
async function fetchProfile(actorName, { site }) {
|
||||
const firstLetter = actorName.charAt(0).toLowerCase();
|
||||
const origin = slugUrlMap[siteSlug] || `https://www.${siteSlug}.com`;
|
||||
const origin = slugUrlMap[site.slug] || site.url;
|
||||
|
||||
const url = `${origin}/model/alpha/${firstLetter}`;
|
||||
const resModels = await get(url);
|
||||
|
||||
Reference in New Issue
Block a user