Passing context object with site or network instead of scraper slug and 'site or network' to all profile scrapers.
This commit is contained in:
@@ -552,7 +552,9 @@ async function fetchActorScenes(actorName, apiUrl, siteSlug) {
|
||||
return [];
|
||||
}
|
||||
|
||||
async function fetchProfile(actorName, siteSlug, altSearchUrl, getActorReleasesUrl, include) {
|
||||
async function fetchProfile(actorName, context, altSearchUrl, getActorReleasesUrl, include) {
|
||||
const siteSlug = context.site?.slug || context.network.slug;
|
||||
|
||||
const actorSlug = actorName.toLowerCase().replace(/\s+/, '+');
|
||||
const searchUrl = altSearchUrl
|
||||
? `https://www.${siteSlug}.com/en/search/${actorSlug}/1/actor`
|
||||
@@ -579,7 +581,9 @@ async function fetchProfile(actorName, siteSlug, altSearchUrl, getActorReleasesU
|
||||
return null;
|
||||
}
|
||||
|
||||
async function fetchApiProfile(actorName, siteSlug, site, include) {
|
||||
async function fetchApiProfile(actorName, context, include) {
|
||||
const siteSlug = context.site?.slug || context.network.slug;
|
||||
|
||||
const actorSlug = encodeURI(actorName);
|
||||
const referer = `https://www.${siteSlug}.com/en/search`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user