forked from DebaucheryLibrarian/traxxx
Added First Anal Quest and Double View Casting latest and scene scraper.
This commit is contained in:
99
src/scrapers/firstanalquest.js
Normal file
99
src/scrapers/firstanalquest.js
Normal file
@@ -0,0 +1,99 @@
|
||||
'use strict';
|
||||
|
||||
const qu = require('../utils/qu');
|
||||
|
||||
function scrapeAllA(scenes, channel) {
|
||||
return scenes.map(({ query }) => {
|
||||
const release = {};
|
||||
|
||||
release.url = query.url('a.thumb-img, a.thumb', 'href', { origin: channel.url });
|
||||
release.entryId = new URL(release.url).pathname.match(/(\d+)\/?$/)?.[1];
|
||||
|
||||
release.title = query.text('.thumb-title, .title');
|
||||
release.date = query.date('.thumb-added, .date', ['MMM D, YYYY', 'MMMM DD, YYYY'], /\w+ \d{1,2}, \d{4}/);
|
||||
release.duration = query.dur('.thumb-duration');
|
||||
|
||||
release.actors = query.all('.thumb-models a, .models a').map(actorEl => ({
|
||||
name: query.cnt(actorEl),
|
||||
url: query.url(actorEl, null, 'href', { origin: channel.url }),
|
||||
}));
|
||||
|
||||
const [, photoUrl, photoCount] = query.q('.thumb-img img', 'onmouseover')?.match(/'(.*)', (\d+)\)/) || [];
|
||||
|
||||
if (photoUrl && photoCount) {
|
||||
[release.poster, ...release.photos] = Array.from({ length: 5 }, (value, index) => `${photoUrl}${index + 1}.jpg`);
|
||||
} else {
|
||||
release.poster = query.img('.thumb-img img, .thumb img', 'src', { origin: channel.url });
|
||||
}
|
||||
|
||||
release.tags = query.cnts('.tags a');
|
||||
release.rating = query.number('.thumb-rating');
|
||||
|
||||
console.log(release);
|
||||
return release;
|
||||
});
|
||||
}
|
||||
|
||||
function scrapeSceneA({ query }, url, channel) {
|
||||
const release = {};
|
||||
|
||||
release.entryId = new URL(url).pathname.match(/(\d+)\/?$/)?.[1];
|
||||
|
||||
release.title = query.cnt('.title, .scene-title h3').replace(/:$/, '');
|
||||
release.description = query.cnt('.text-desc p, .info-description p');
|
||||
|
||||
release.duration = query.dur('.media-body li span, .duration');
|
||||
|
||||
release.actors = query.all('.media-body a[href*="models/"], .models a').map(actorEl => ({
|
||||
name: query.cnt(actorEl),
|
||||
url: query.url(actorEl, null, 'href', { origin: channel.url }),
|
||||
}));
|
||||
|
||||
release.tags = query.cnts('.media-body a[href*="tags/"], .tags a');
|
||||
|
||||
release.poster = [
|
||||
query.img('.player-preview'),
|
||||
qu.prefixUrl(`/contents/videos_screenshots/0/${release.entryId}/preview_trailer.mp4.jpg`, channel.url),
|
||||
qu.prefixUrl(query.q('param[name="flashvars"]', 'value')?.match(/poster=(.*\.jpg)/)?.[1], channel.url),
|
||||
qu.prefixUrl(`/contents/scenes/${release.entyId}/thumbnails/920x518.jpg`, channel.url),
|
||||
];
|
||||
|
||||
release.photos = query.urls('.thumb-album a:not([href="#"]), .thumbs-photo a:not([href*="signup"])', 'href', { origin: channel.url })
|
||||
.concat(query.imgs('.thumb-album a[href="#"] img, .thumbs-photo a[href*="signup"] img', 'src', { origin: channel.url }));
|
||||
|
||||
release.trailer = query.url('a[href*="get_file/"], .download a');
|
||||
|
||||
console.log(release);
|
||||
return release;
|
||||
}
|
||||
|
||||
async function fetchLatestA(channel, page) {
|
||||
const url = channel.parameters?.latest
|
||||
? `${channel.parameters.latest}/${page}`
|
||||
: `${channel.url}/latest-updates/${page}/`;
|
||||
|
||||
const res = await qu.getAll(url, '.list-thumbs ul > li, .main-thumbs > li');
|
||||
|
||||
if (res.ok) {
|
||||
return scrapeAllA(res.items, channel);
|
||||
}
|
||||
|
||||
return res.status;
|
||||
}
|
||||
|
||||
async function fetchSceneA(url, channel) {
|
||||
const res = await qu.get(url, '.main, .main-content');
|
||||
|
||||
if (res.ok) {
|
||||
return scrapeSceneA(res.item, url, channel);
|
||||
}
|
||||
|
||||
return res.status;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
a: {
|
||||
fetchLatest: fetchLatestA,
|
||||
fetchScene: fetchSceneA,
|
||||
},
|
||||
};
|
||||
@@ -22,6 +22,7 @@ const evilangel = require('./evilangel');
|
||||
const fakehub = require('./fakehub');
|
||||
const famedigital = require('./famedigital');
|
||||
const fantasymassage = require('./fantasymassage');
|
||||
const firstanalquest = require('./firstanalquest');
|
||||
const fcuk = require('./fcuk');
|
||||
const fullpornnetwork = require('./fullpornnetwork');
|
||||
const girlsway = require('./girlsway');
|
||||
@@ -110,6 +111,7 @@ const scrapers = {
|
||||
famedigital,
|
||||
fantasymassage,
|
||||
fcuk,
|
||||
firstanalquest,
|
||||
forbondage: porndoe,
|
||||
fullpornnetwork,
|
||||
girlsway,
|
||||
|
||||
Reference in New Issue
Block a user