Added Girl Girl to Jules Jordan.

This commit is contained in:
ThePendulum 2020-02-12 23:49:22 +01:00
parent d79c6aee7f
commit b7abd805e2
5 changed files with 37 additions and 28 deletions

View File

@ -63,7 +63,7 @@
<script>
function photos() {
if (this.release.trailer) {
if (this.release.trailer || this.release.teaser) {
// poster will be on trailer video
return this.release.photos;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

@ -1865,6 +1865,13 @@ const sites = [
description: 'Jules Jordan\'s Official Membership Site',
network: 'julesjordan',
},
{
slug: 'girlgirl',
name: 'Girl Girl',
url: 'https://www.girlgirl.com',
tags: ['lesbian'],
network: 'julesjordan',
},
{
slug: 'theassfactory',
name: 'The Ass Factory',

View File

@ -6,6 +6,7 @@ const cheerio = require('cheerio');
const { JSDOM } = require('jsdom');
const moment = require('moment');
const logger = require('../logger');
const { heightToCm } = require('../utils/convert');
async function fetchPhotos(url) {
@ -45,7 +46,7 @@ function scrapePhotos(html, type) {
async function getPhotosLegacy(entryId, site, type = 'highres', page = 1) {
const albumUrl = `${site.url}/trial/gallery.php?id=${entryId}&type=${type}&page=${page}`;
console.warn(`Jules Jordan is using legacy photo scraper for ${albumUrl} (page ${page})`);
logger.warn(`Jules Jordan is using legacy photo scraper for ${albumUrl} (page ${page})`);
const html = await fetchPhotos(albumUrl);
const $ = cheerio.load(html, { normalizeWhitespace: true });
@ -116,9 +117,25 @@ function scrapeLatest(html, site) {
const scenesElements = $('.update_details').toArray();
return scenesElements.map((element) => {
const release = {};
const sceneLinkElement = $(element).find('a[title*=" "]');
release.url = sceneLinkElement.attr('href');
release.title = sceneLinkElement.text();
release.entryId = $(element).attr('data-setid');
release.date = moment
.utc($(element).find('.update_date').text(), 'MM/DD/YYYY')
.toDate();
release.actors = $(element).find('.update_models a')
.map((actorIndex, actorElement) => $(actorElement).text())
.toArray();
const photoElement = $(element).find('a img.thumbs');
const photoCount = Number(photoElement.attr('cnt'));
const [poster, ...photos] = Array.from({ length: photoCount }, (value, index) => {
[release.poster, ...release.photos] = Array.from({ length: photoCount }, (value, index) => {
const src = photoElement.attr(`src${index}_1x`) || photoElement.attr(`src${index}`);
if (!src) return null;
@ -127,30 +144,13 @@ function scrapeLatest(html, site) {
return `${site.url}${src}`;
}).filter(photoUrl => photoUrl);
const sceneLinkElement = $(element).children('a').eq(1);
const url = sceneLinkElement.attr('href');
const title = sceneLinkElement.text();
const teaserScript = $(element).find('script').html();
if (teaserScript) {
const src = teaserScript.slice(teaserScript.indexOf('http'), teaserScript.indexOf('.mp4') + 4);
if (src) release.teaser = { src };
}
const entryId = $(element).attr('data-setid');
const date = moment
.utc($(element).find('.update_date').text(), 'MM/DD/YYYY')
.toDate();
const actors = $(element).find('.update_models a')
.map((actorIndex, actorElement) => $(actorElement).text())
.toArray();
return {
url,
entryId,
title,
actors,
date,
poster,
photos,
site,
};
return release;
});
}
@ -210,7 +210,9 @@ async function scrapeScene(html, url, site) {
const release = { url, site };
release.title = $('.title_bar_hilite').text().trim();
[release.entryId] = $('.suggest_tags a').attr('href').match(/\d+/);
const setIdIndex = html.indexOf('setid:"');
release.entryId = html.slice(setIdIndex, html.indexOf(',', setIdIndex)).match(/\d+/)[0];
const dateElement = $('.update_date').text().trim();
const dateComment = $('*')
@ -232,7 +234,7 @@ async function scrapeScene(html, url, site) {
release.description = $('.update_description').text().trim();
release.actors = $('.backgroundcolor_info > .update_models a')
release.actors = $('.backgroundcolor_info > .update_models a, .item .update_models a')
.map((_actorIndex, actorElement) => $(actorElement).text())
.toArray();