Major API change for 'q', renamed to 'qu', refactored modules. Fixed Gamma URL entry ID regex.
This commit is contained in:
@@ -18,23 +18,23 @@ function matchActors(actorString, models) {
|
||||
}
|
||||
|
||||
function scrapeLatest(scenes, site, models) {
|
||||
return scenes.map(({ q, qd, qu, qi }) => {
|
||||
return scenes.map(({ qu }) => {
|
||||
const release = {};
|
||||
|
||||
const pathname = qu('a.itemimg').slice(1);
|
||||
const pathname = qu.url('a.itemimg').slice(1);
|
||||
[release.entryId] = pathname.split('/').slice(-1);
|
||||
release.url = `${site.url}${pathname}`;
|
||||
|
||||
release.title = q('.itemimg img', 'alt') || q('h4 a', true);
|
||||
release.description = q('.mas_longdescription', true);
|
||||
release.date = qd('.movie_info2', 'MM/DD/YY', /\d{2}\/\d{2}\/\d{2}/);
|
||||
release.title = qu.q('.itemimg img', 'alt') || qu.q('h4 a', true);
|
||||
release.description = qu.q('.mas_longdescription', true);
|
||||
release.date = qu.date('.movie_info2', 'MM/DD/YY', /\d{2}\/\d{2}\/\d{2}/);
|
||||
|
||||
const actorString = q('.mas_description', true);
|
||||
const actorString = qu.q('.mas_description', true);
|
||||
const actors = matchActors(actorString, models);
|
||||
if (actors.length > 0) release.actors = actors;
|
||||
else release.actors = extractActors(actorString);
|
||||
|
||||
const posterPath = qi('.itemimg img');
|
||||
const posterPath = qu.img('.itemimg img');
|
||||
release.poster = `${site.url}/${posterPath}`;
|
||||
|
||||
return release;
|
||||
@@ -72,17 +72,17 @@ function scrapeScene({ html, q, qa, qd, qis }, url, site, models) {
|
||||
function extractModels({ el }, site) {
|
||||
const models = ctxa(el, '.item');
|
||||
|
||||
return models.map(({ q, qu }) => {
|
||||
return models.map(({ qu }) => {
|
||||
const actor = { gender: 'female' };
|
||||
|
||||
const avatar = q('.itemimg img');
|
||||
const avatar = qu.q('.itemimg img');
|
||||
actor.avatar = `${site.url}/${avatar.src}`;
|
||||
actor.name = avatar.alt
|
||||
.split(':').slice(-1)[0]
|
||||
.replace(/xtreme girl|nurse/ig, '')
|
||||
.trim();
|
||||
|
||||
const actorPath = qu('.itemimg');
|
||||
const actorPath = qu.url('.itemimg');
|
||||
actor.url = `${site.url}${actorPath.slice(1)}`;
|
||||
|
||||
return actor;
|
||||
|
||||
Reference in New Issue
Block a user