Added Hussie Pass scraper.

This commit is contained in:
ThePendulum 2020-03-05 02:47:52 +01:00
parent f3a3ed6369
commit 956afa6ae7
21 changed files with 259 additions and 7 deletions

View File

@ -180,10 +180,6 @@ export default {
.icon {
fill: $shadow;
}
&:focus .icon {
fill: $primary;
}
}
.search-compact {

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

@ -164,6 +164,10 @@ const tags = [
slug: 'bbc',
group: 'body',
},
{
name: 'behind the scenes',
slug: 'behind-the-scenes',
},
{
name: 'big dick',
slug: 'big-dick',
@ -511,6 +515,12 @@ const tags = [
name: 'massage',
slug: 'massage',
},
{
name: 'male focus',
slug: 'male-focus',
priority: 7,
description: 'Straight porn highlighting the male talent.',
},
{
name: 'masturbation',
slug: 'masturbation',
@ -894,6 +904,11 @@ const aliases = [
name: 'boob fucking',
for: 'titty-fuck',
},
{
name: 'bts',
for: 'behind-the-scenes',
secondary: true,
},
{
name: 'mfm',
for: 'mmf',

View File

@ -166,6 +166,11 @@ const networks = [
name: 'Girl Girl',
url: 'https://www.girlgirl.com',
},
{
slug: 'hussiepass',
name: 'Hussie Pass',
url: 'http://www.hussiepass.com',
},
{
slug: 'insex',
name: 'Insex',

View File

@ -2052,6 +2052,66 @@ const sites = [
scene: 'https://www.girlsway.com/en/video',
},
},
// HUSSIE PASS
{
slug: 'hussiepass',
name: 'Hussie Pass',
url: 'https://www.hussiepass.com',
network: 'hussiepass',
},
{
slug: 'interracialpass',
name: 'Interracial Pass',
url: 'https://www.interracialpass.com',
tags: ['interracial'],
network: 'hussiepass',
parameters: {
t1: true,
},
},
{
slug: 'shotherfirst',
name: 'Shot Her First',
url: 'https://hushpass.com/tgp/',
network: 'hussiepass',
},
{
slug: 'hushpass',
name: 'hushpass',
url: 'https://hushpass.com',
network: 'hussiepass',
},
{
slug: 'eyeontheguy',
name: 'Eye On The Guy',
url: 'https://eyeontheguy.com',
tags: ['male-focus'],
network: 'hussiepass',
parameters: {
t1: true,
},
},
{
slug: 'seehimfuck',
name: 'See Him Fuck',
url: 'https://seehimfuck.com',
tags: ['male-focus'],
network: 'hussiepass',
},
{
slug: 'interracialpovs',
name: 'Interracial POVs',
url: 'https://www.interracialpovs.com',
tags: ['interracial', 'pov'],
network: 'hussiepass',
},
{
slug: 'povpornstars',
name: 'POV Pornstars',
url: 'https://www.povpornstars.com',
tags: ['pov'],
network: 'hussiepass',
},
// INSEX
{
slug: 'sexuallybroken',

View File

@ -17,6 +17,7 @@ const {
} = require('./media');
const { fetchSites, findSiteByUrl } = require('./sites');
const slugify = require('./utils/slugify');
const capitalize = require('./utils/capitalize');
function commonQuery(queryBuilder, {
filter = [],
@ -308,7 +309,17 @@ function accumulateActors(releases) {
if (actor.name) acc[actorSlug] = { ...acc[actorSlug], ...actor }; // actor input contains profile info
if (actor.avatar) {
acc[actorSlug].avatars = acc[actorSlug].avatars.concat([actor.avatar]); // don't flatten fallbacks
const avatar = Array.isArray(actor.avatar)
? actor.avatar.map(avatarX => ({
src: avatarX.src || avatarX,
copyright: avatarX.copyright === undefined ? capitalize(release.site?.network?.name) : avatarX.copyright,
}))
: {
src: actor.avatar.src || actor.avatar,
copyright: actor.avatar.copyright === undefined ? capitalize(release.site?.network?.name) : actor.avatar.copyright,
};
acc[actorSlug].avatars = acc[actorSlug].avatars.concat([avatar]); // don't flatten fallbacks
}
});

165
src/scrapers/hussiepass.js Normal file
View File

@ -0,0 +1,165 @@
'use strict';
// const util = require('util');
const { get, geta, fd } = require('../utils/q');
const slugify = require('../utils/slugify');
function scrapeLatest(scenes, site) {
return scenes.map(({ q, qu, qd, ql }) => {
const release = {};
release.entryId = q('.modelimg img', 'id').match(/set-target-(\d+)/)[1];
release.title = q('h3 a', 'title') || q('h3 a', true);
release.url = qu('h3 a');
release.date = qd('.modeldata p', 'YYYY-MM-DD', /\d{4}-\d{2}-\d{2}/);
release.duration = ql('.modeldata p');
if (/bts|behind the scenes/i.test(release.title)) release.tags = ['behind-the-scenes'];
release.poster = [
q('.modelimg img', 'src0_3x'),
q('.modelimg img', 'src0_2x'),
q('.modelimg img', 'src0_1x'),
].filter(Boolean).map(src => `${site.url}${src}`);
return release;
});
}
function scrapeLatestT1(scenes, site) {
return scenes.map(({ q, qi, qd, ql, qu }) => {
const release = {};
release.title = q('h4 a', 'title') || q('h4 a', true);
release.url = qu('h4 a');
release.date = qd('.more-info-div', 'MMM D, YYYY');
release.duration = ql('.more-info-div');
release.entryId = q('.img-div img', 'id')?.match(/set-target-(\d+)/)[1]
|| `${slugify(fd(release.date, 'YYYY-MM-DD'))}-${slugify(release.title)}`;
const posterPath = q('.img-div img', 'src0_1x') || qi('img.video_placeholder');
if (posterPath) {
const poster = /^http/.test(posterPath) ? posterPath : `${site.url}${posterPath}`;
release.poster = [
poster.replace('-1x', '-3x'),
poster.replace('-1x', '-2x'),
poster,
];
}
return release;
});
}
function scrapeScene({ html, q, qa, qd, ql }, site, url, baseRelease) {
const release = {};
release.entryId = html.match(/set-target-(\d+)/)[1];
release.title = q('.centerwrap h2', true);
release.description = q('.videocontent p', true);
release.date = qd('.videodetails .date', 'MM/DD/YYYY');
release.duration = ql('.videodetails .date');
release.actors = qa('.modelname a', true);
const posterPath = html.match(/poster="([\w-/.]+)"/)?.[1];
if (posterPath && !/400.jpg/.test(posterPath)) {
const poster = `${site.url}${posterPath}`;
release.poster = [
poster,
// upscaled
poster.replace('-1x', '-2x'),
poster.replace('-1x', '-3x'),
];
if (baseRelease?.poster) release.photos = [baseRelease.poster];
}
const trailerPath = html.match(/\/trailers\/.*.mp4/);
if (trailerPath) release.trailer = { src: `${site.url}${trailerPath}` };
const stars = q('.modelrates + p', true).match(/\d.\d/)?.[0];
if (stars) release.stars = Number(stars);
return release;
}
function scrapeSceneT1({ html, q, qa, qd, ql, qtx }, site, url, baseRelease) {
const release = {};
release.title = q('.trailer-section-head .section-title', true);
release.description = qtx('.row .update-info-block');
release.date = qd('.update-info-row', 'MMM D, YYYY', /\w+ \d{1,2}, \d{4}/);
release.duration = ql('.update-info-row:nth-child(2)');
release.entryId = q('.player-thumb img', 'id').match(/set-target-(\d+)/)[1]
|| `${slugify(fd(release.date, 'YYYY-MM-DD'))}-${slugify(release.title)}`;
release.actors = qa('.models-list-thumbs a').map(el => ({
name: q(el, 'span', true),
avatar: [
q(el, 'img', 'src0_3x'),
q(el, 'img', 'src0_2x'),
q(el, 'img', 'src0_1x'),
].filter(Boolean).map(src => `${site.url}${src}`),
}));
release.tags = qa('.tags a', true);
const posterPath = html.match(/poster="(.*\.jpg)/)?.[1];
if (posterPath && !/400.jpg/.test(posterPath)) {
const poster = `${site.url}${posterPath}`;
release.poster = [
poster,
// upscaled
poster.replace('-1x', '-2x'),
poster.replace('-1x', '-3x'),
];
if (baseRelease?.poster) release.photos = [baseRelease.poster];
}
const trailer = html.match(/<video.*src="(.*\.mp4)/)?.[1];
if (trailer && /^http/.test(trailer)) release.trailer = { src: trailer, referer: url };
else if (trailer) release.trailer = { src: `${site.url}${trailer}`, referer: url };
const stars = q('.update-rating', true).match(/\d.\d/)?.[0];
if (stars) release.stars = Number(stars);
return release;
}
async function fetchLatest(site, page = 1) {
const url = site.parameters?.t1
? `${site.url}/t1/categories/movies_${page}_d.html`
: `${site.url}/categories/movies_${page}_d.html`;
const qLatest = await geta(url, '.modelfeature, .item-video');
if (!qLatest) return null;
return site.parameters?.t1 ? scrapeLatestT1(qLatest, site) : scrapeLatest(qLatest, site);
}
async function fetchScene(url, site, baseRelease) {
const qScene = await get(url);
if (!qScene) return null;
return site.parameters?.t1 ? scrapeSceneT1(qScene, site, url, baseRelease) : scrapeScene(qScene, site, url, baseRelease);
}
module.exports = {
fetchLatest,
fetchScene,
};

View File

@ -98,8 +98,6 @@ async function scrapeScene(html, url, site) {
release.poster = qp('video') || qi('.flowplayer img') || qi('img'); // _800.jpg is larger than _xl.jpg in landscape
const photosUrl = qu('.stat a[href*=photos]');
console.log(release.poster);
if (photosUrl) {
release.photos = await fetchPhotos(photosUrl);
} else {

View File

@ -19,6 +19,7 @@ const famedigital = require('./famedigital');
const fantasymassage = require('./fantasymassage');
const fullpornnetwork = require('./fullpornnetwork');
const girlsway = require('./girlsway');
const hussiepass = require('./hussiepass');
const iconmale = require('./iconmale');
const insex = require('./insex');
const jayrock = require('./jayrock');
@ -86,6 +87,7 @@ module.exports = {
fullpornnetwork,
girlsway,
girlgirl: julesjordan,
hussiepass,
insex,
jayrock,
julesjordan,