forked from DebaucheryLibrarian/traxxx
Major API change for 'q', renamed to 'qu', refactored modules. Fixed Gamma URL entry ID regex.
This commit is contained in:
@@ -62,19 +62,23 @@ async function fetchClassicProfile(actorName, siteSlug) {
|
||||
const actorSlug = slugify(actorName);
|
||||
|
||||
const url = `https://${siteSlug}.com/en/pornstars`;
|
||||
const { qa } = await get(url);
|
||||
const pornstarsRes = await get(url);
|
||||
|
||||
const actorPath = qa('option[value*="/pornstar"]')
|
||||
if (!pornstarsRes.ok) return null;
|
||||
|
||||
const actorPath = pornstarsRes.item.qa('option[value*="/pornstar"]')
|
||||
.find(el => slugify(el.textContent) === actorSlug)
|
||||
?.value;
|
||||
|
||||
if (actorPath) {
|
||||
const actorUrl = `https://${siteSlug}.com${actorPath}`;
|
||||
const { html } = await get(actorUrl);
|
||||
const res = await get(actorUrl);
|
||||
|
||||
const releases = scrapeAll(html, null, `https://www.${siteSlug}.com`, false);
|
||||
if (res.ok) {
|
||||
const releases = scrapeAll(res.item, null, `https://www.${siteSlug}.com`, false);
|
||||
|
||||
return { releases };
|
||||
return { releases };
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user