Updated Naughty America scraper, added media support..
@@ -184,7 +184,6 @@ exports.up = knex => Promise.resolve()
|
||||
|
||||
table.string('shoot_id');
|
||||
table.string('entry_id');
|
||||
table.unique(['site_id', 'shoot_id']);
|
||||
table.unique(['site_id', 'entry_id']);
|
||||
|
||||
table.string('url', 1000);
|
||||
|
||||
BIN
public/img/logos/naughtyamerica/2chickssametime.png
Normal file
|
After Width: | Height: | Size: 79 KiB |
BIN
public/img/logos/naughtyamerica/americandaydreams.png
Normal file
|
After Width: | Height: | Size: 58 KiB |
BIN
public/img/logos/naughtyamerica/analcollege.png
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
public/img/logos/naughtyamerica/asian1on1.png
Normal file
|
After Width: | Height: | Size: 9.6 KiB |
BIN
public/img/logos/naughtyamerica/assmasterpiece.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
public/img/logos/naughtyamerica/bigcockbully.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
public/img/logos/naughtyamerica/bigcockhero.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
public/img/logos/naughtyamerica/diaryofamilf.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
public/img/logos/naughtyamerica/diaryofananny.png
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
public/img/logos/naughtyamerica/dirtywivesclub.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
public/img/logos/naughtyamerica/fasttimes.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
public/img/logos/naughtyamerica/housewife1on1.png
Normal file
|
After Width: | Height: | Size: 9.3 KiB |
BIN
public/img/logos/naughtyamerica/ihaveawife.png
Normal file
|
After Width: | Height: | Size: 76 KiB |
BIN
public/img/logos/naughtyamerica/insidenaughtyamerica.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
public/img/logos/naughtyamerica/lasluts.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
public/img/logos/naughtyamerica/latinadultery.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
public/img/logos/naughtyamerica/latinastepmom.png
Normal file
|
After Width: | Height: | Size: 64 KiB |
BIN
public/img/logos/naughtyamerica/lesbiangirlongirl.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
public/img/logos/naughtyamerica/livegymcam.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
public/img/logos/naughtyamerica/livenaughtymilf.png
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
public/img/logos/naughtyamerica/livenaughtynurse.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
public/img/logos/naughtyamerica/livenaughtysecretary.png
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
public/img/logos/naughtyamerica/livenaughtystudent.png
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
public/img/logos/naughtyamerica/livenaughtyteacher.png
Normal file
|
After Width: | Height: | Size: 57 KiB |
BIN
public/img/logos/naughtyamerica/livepartygirl.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
public/img/logos/naughtyamerica/milfsugarbabesclassic.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
public/img/logos/naughtyamerica/momshoney.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
public/img/logos/naughtyamerica/mydadshotgirlfriend.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
public/img/logos/naughtyamerica/mydaughtershotfriend.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
public/img/logos/naughtyamerica/myfirstsexteacher.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
public/img/logos/naughtyamerica/myfriendshotgirl.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
public/img/logos/naughtyamerica/myfriendshotmom.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
public/img/logos/naughtyamerica/mygirlfriendsbustyfriend.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
public/img/logos/naughtyamerica/mygirllovesanal.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
public/img/logos/naughtyamerica/mynaughtylatinmaid.png
Normal file
|
After Width: | Height: | Size: 42 KiB |
BIN
public/img/logos/naughtyamerica/mynaughtymassage.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
public/img/logos/naughtyamerica/mysistershotfriend.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
public/img/logos/naughtyamerica/mywifeismypornstar.png
Normal file
|
After Width: | Height: | Size: 77 KiB |
BIN
public/img/logos/naughtyamerica/mywifeshotfriend.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
public/img/logos/naughtyamerica/naughtyamerica.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
public/img/logos/naughtyamerica/naughtyathletics.png
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
BIN
public/img/logos/naughtyamerica/naughtybookworms.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
public/img/logos/naughtyamerica/naughtycountrygirls.png
Normal file
|
After Width: | Height: | Size: 73 KiB |
BIN
public/img/logos/naughtyamerica/naughtyflipside.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
public/img/logos/naughtyamerica/naughtyoffice.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
public/img/logos/naughtyamerica/naughtyrichgirls.png
Normal file
|
After Width: | Height: | Size: 56 KiB |
BIN
public/img/logos/naughtyamerica/naughtyweddings.png
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
public/img/logos/naughtyamerica/neighboraffair.png
Normal file
|
After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 25 KiB |
BIN
public/img/logos/naughtyamerica/openfamily.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 29 KiB |
BIN
public/img/logos/naughtyamerica/seducedbyacougar.png
Normal file
|
After Width: | Height: | Size: 102 KiB |
BIN
public/img/logos/naughtyamerica/showmybf.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
public/img/logos/naughtyamerica/sleazystepdad.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
public/img/logos/naughtyamerica/slutstepmom.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
public/img/logos/naughtyamerica/slutstepsister.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
public/img/logos/naughtyamerica/socalcoeds.png
Normal file
|
After Width: | Height: | Size: 55 KiB |
BIN
public/img/logos/naughtyamerica/teenslovecream.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
public/img/logos/naughtyamerica/thepassenger.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
public/img/logos/naughtyamerica/tonightsfuck.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
public/img/logos/naughtyamerica/tonightsgirlfriendclassic.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
public/img/logos/naughtyamerica/watchyourmom.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
public/img/logos/naughtyamerica/watchyourwife.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
public/img/logos/naughtyamerica/wivesonvacation.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
@@ -223,12 +223,16 @@ async function fetchTagReleases(queryObject, options = {}) {
|
||||
async function storeReleaseAssets(release, releaseId) {
|
||||
await createReleaseMediaDirectory(release, releaseId);
|
||||
|
||||
await Promise.all([
|
||||
associateTags(release, releaseId),
|
||||
storePhotos(release, releaseId),
|
||||
storePoster(release, releaseId),
|
||||
storeTrailer(release, releaseId),
|
||||
]);
|
||||
try {
|
||||
await Promise.all([
|
||||
associateTags(release, releaseId),
|
||||
storePhotos(release, releaseId),
|
||||
storePoster(release, releaseId),
|
||||
storeTrailer(release, releaseId),
|
||||
]);
|
||||
} catch (error) {
|
||||
console.log(release, error);
|
||||
}
|
||||
}
|
||||
|
||||
async function storeRelease(release) {
|
||||
|
||||
@@ -5,9 +5,6 @@ const bhttp = require('bhttp');
|
||||
const cheerio = require('cheerio');
|
||||
const moment = require('moment');
|
||||
|
||||
const knex = require('../knex');
|
||||
const { matchTags } = require('../tags');
|
||||
|
||||
function titleExtractor(pathname) {
|
||||
const components = pathname.split('/')[2].split('-');
|
||||
const entryId = components.slice(-1)[0];
|
||||
@@ -34,6 +31,9 @@ function scrapeLatest(html, site) {
|
||||
|
||||
const duration = Number(element.find('.scene-runtime').text().slice(0, -4)) * 60;
|
||||
|
||||
const posterString = sceneLinkElement.find('img[data-srcset]').attr('data-srcset') || sceneLinkElement.find('img[data-src]').attr('data-src');
|
||||
const poster = `https:${posterString.match(/[\w/.]+$/)[0]}`;
|
||||
|
||||
return {
|
||||
url,
|
||||
entryId,
|
||||
@@ -41,6 +41,7 @@ function scrapeLatest(html, site) {
|
||||
actors,
|
||||
date,
|
||||
duration,
|
||||
poster,
|
||||
rating: null,
|
||||
site,
|
||||
};
|
||||
@@ -63,18 +64,17 @@ async function scrapeScene(html, url, site) {
|
||||
|
||||
const duration = Number(sceneElement.find('.duration-ratings .duration').text().slice(10, -4)) * 60;
|
||||
|
||||
const poster = `https:${$('video, dl8-video').attr('poster')}`;
|
||||
const photos = $('.contain-scene-images.desktop-only a').map((index, el) => `https:${$(el).attr('href')}`).toArray();
|
||||
|
||||
const trailerEl = $('source');
|
||||
const trailerSrc = trailerEl.attr('src');
|
||||
const trailerType = trailerEl.attr('type');
|
||||
|
||||
const siteName = sceneElement.find('a.site-title').text();
|
||||
const siteId = siteName.replace(/[\s']+/g, '').toLowerCase();
|
||||
const channel = siteName.replace(/[\s']+/g, '').toLowerCase();
|
||||
|
||||
const rawTags = $('.categories a.cat-tag').map((tagIndex, tagElement) => $(tagElement).text()).toArray();
|
||||
|
||||
const [channelSite, tags] = await Promise.all([
|
||||
knex('sites')
|
||||
.where({ slug: siteId })
|
||||
.orWhere({ name: siteName })
|
||||
.first(),
|
||||
matchTags(rawTags),
|
||||
]);
|
||||
const tags = $('.categories a.cat-tag').map((tagIndex, tagElement) => $(tagElement).text()).toArray();
|
||||
|
||||
return {
|
||||
url,
|
||||
@@ -85,8 +85,15 @@ async function scrapeScene(html, url, site) {
|
||||
date,
|
||||
duration,
|
||||
tags,
|
||||
photos,
|
||||
poster,
|
||||
trailer: {
|
||||
src: trailerSrc,
|
||||
type: trailerType,
|
||||
},
|
||||
rating: null,
|
||||
site: channelSite || site,
|
||||
site,
|
||||
channel,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||