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> <script>
function photos() { function photos() {
if (this.release.trailer) { if (this.release.trailer || this.release.teaser) {
// poster will be on trailer video // poster will be on trailer video
return this.release.photos; 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', description: 'Jules Jordan\'s Official Membership Site',
network: 'julesjordan', network: 'julesjordan',
}, },
{
slug: 'girlgirl',
name: 'Girl Girl',
url: 'https://www.girlgirl.com',
tags: ['lesbian'],
network: 'julesjordan',
},
{ {
slug: 'theassfactory', slug: 'theassfactory',
name: 'The Ass Factory', name: 'The Ass Factory',

View File

@ -6,6 +6,7 @@ const cheerio = require('cheerio');
const { JSDOM } = require('jsdom'); const { JSDOM } = require('jsdom');
const moment = require('moment'); const moment = require('moment');
const logger = require('../logger');
const { heightToCm } = require('../utils/convert'); const { heightToCm } = require('../utils/convert');
async function fetchPhotos(url) { async function fetchPhotos(url) {
@ -45,7 +46,7 @@ function scrapePhotos(html, type) {
async function getPhotosLegacy(entryId, site, type = 'highres', page = 1) { async function getPhotosLegacy(entryId, site, type = 'highres', page = 1) {
const albumUrl = `${site.url}/trial/gallery.php?id=${entryId}&type=${type}&page=${page}`; 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 html = await fetchPhotos(albumUrl);
const $ = cheerio.load(html, { normalizeWhitespace: true }); const $ = cheerio.load(html, { normalizeWhitespace: true });
@ -116,9 +117,25 @@ function scrapeLatest(html, site) {
const scenesElements = $('.update_details').toArray(); const scenesElements = $('.update_details').toArray();
return scenesElements.map((element) => { 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 photoElement = $(element).find('a img.thumbs');
const photoCount = Number(photoElement.attr('cnt')); 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}`); const src = photoElement.attr(`src${index}_1x`) || photoElement.attr(`src${index}`);
if (!src) return null; if (!src) return null;
@ -127,30 +144,13 @@ function scrapeLatest(html, site) {
return `${site.url}${src}`; return `${site.url}${src}`;
}).filter(photoUrl => photoUrl); }).filter(photoUrl => photoUrl);
const sceneLinkElement = $(element).children('a').eq(1); const teaserScript = $(element).find('script').html();
const url = sceneLinkElement.attr('href'); if (teaserScript) {
const title = sceneLinkElement.text(); const src = teaserScript.slice(teaserScript.indexOf('http'), teaserScript.indexOf('.mp4') + 4);
if (src) release.teaser = { src };
}
const entryId = $(element).attr('data-setid'); return release;
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,
};
}); });
} }
@ -210,7 +210,9 @@ async function scrapeScene(html, url, site) {
const release = { url, site }; const release = { url, site };
release.title = $('.title_bar_hilite').text().trim(); 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 dateElement = $('.update_date').text().trim();
const dateComment = $('*') const dateComment = $('*')
@ -232,7 +234,7 @@ async function scrapeScene(html, url, site) {
release.description = $('.update_description').text().trim(); 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()) .map((_actorIndex, actorElement) => $(actorElement).text())
.toArray(); .toArray();