Major API change for 'q', renamed to 'qu', refactored modules. Fixed Gamma URL entry ID regex.

This commit is contained in:
2020-03-09 02:02:29 +01:00
parent 7d71cf3a8c
commit 6cbb7f9c1e
21 changed files with 611 additions and 561 deletions

View File

@@ -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;