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:
@@ -178,16 +178,16 @@ async function fetchScene(url, site) {
|
||||
async function fetchProfile(actorName) {
|
||||
const actorSearchSlug = slugify(actorName, { delimiter: '+' });
|
||||
const url = `https://www.private.com/search.php?query=${actorSearchSlug}`;
|
||||
const modelLinks = await geta(url, '.model h3 a');
|
||||
const modelRes = await geta(url, '.model h3 a');
|
||||
|
||||
if (modelLinks) {
|
||||
if (modelRes.ok) {
|
||||
const actorSlug = slugify(actorName);
|
||||
const model = modelLinks.find(({ text }) => slugify(text) === actorSlug);
|
||||
const model = modelRes.items.find(({ text }) => slugify(text) === actorSlug);
|
||||
|
||||
if (model) {
|
||||
const qProfile = await get(model.el.href);
|
||||
const res = await get(model.el.href);
|
||||
|
||||
return qProfile && scrapeProfile(qProfile);
|
||||
return res.ok ? scrapeProfile(res.item) : res.status;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user