diff --git a/assets/img/icons/feed.svg b/assets/img/icons/feed.svg new file mode 100644 index 00000000..658b0164 --- /dev/null +++ b/assets/img/icons/feed.svg @@ -0,0 +1,5 @@ + + +feed + + diff --git a/public/img/tags/facial/3.jpeg b/public/img/tags/facial/3.jpeg new file mode 100644 index 00000000..6dbeb307 Binary files /dev/null and b/public/img/tags/facial/3.jpeg differ diff --git a/public/img/tags/facial/lazy/3.jpeg b/public/img/tags/facial/lazy/3.jpeg new file mode 100644 index 00000000..9c93c8f1 Binary files /dev/null and b/public/img/tags/facial/lazy/3.jpeg differ diff --git a/public/img/tags/facial/originals/3.jpeg b/public/img/tags/facial/originals/3.jpeg new file mode 100644 index 00000000..adc59848 Binary files /dev/null and b/public/img/tags/facial/originals/3.jpeg differ diff --git a/public/img/tags/facial/thumbs/3.jpeg b/public/img/tags/facial/thumbs/3.jpeg new file mode 100644 index 00000000..10562f2f Binary files /dev/null and b/public/img/tags/facial/thumbs/3.jpeg differ diff --git a/seeds/04_media.js b/seeds/04_media.js index 7d848e7f..0b4bede4 100644 --- a/seeds/04_media.js +++ b/seeds/04_media.js @@ -792,8 +792,9 @@ const tagPhotos = [ ['dv-tp', 1, 'Adriana Chechik in "Adriana\'s Triple Anal Penetration!"'], ['dv-tp', 0, 'Luna Rival in LegalPorno SZ1490'], ['ebony', 1, 'Ana Foxxx in "DP Me 4" for HardX'], - ['facial', 2, 'Ashly Anderson for Hookup Hotshot'], + ['facial', 3, 'Paige Owens in "Oral Restraint" for Babes'], ['facial', 'poster', 'Jynx Maze'], + ['facial', 2, 'Ashly Anderson for Hookup Hotshot'], ['facefucking', 6, 'Halle Hayes in "Towering Temptress" for 5K Porn'], ['facefucking', 1, 'Paige Owens in "Dark Meat 12" for Evil Angel'], ['facefucking', 0, 'Ashly Anderson in "Rough Love" for Hookup Hotshot'], diff --git a/src/scrapers/dogfart.js b/src/scrapers/dogfart.js index 56d55a3b..43effc9c 100644 --- a/src/scrapers/dogfart.js +++ b/src/scrapers/dogfart.js @@ -6,6 +6,8 @@ const { JSDOM } = require('jsdom'); const moment = require('moment'); const http = require('../utils/http'); +const slugify = require('../utils/slugify'); +const qu = require('../utils/qu'); async function getPhotos(albumUrl) { const res = await http.get(albumUrl); @@ -20,51 +22,51 @@ async function getPhotos(albumUrl) { return { url: pageUrl, - extract: ({ qu }) => qu.q('.scenes-module img', 'src'), + extract: ({ query }) => query.img('.scenes-module img'), }; }); return photoUrls; } -function scrapeLatest(html, site) { +function scrapeLatest(html, site, filter = true) { const { document } = new JSDOM(html).window; const sceneElements = Array.from(document.querySelectorAll('.recent-updates')); - return sceneElements.reduce((acc, element) => { - const siteUrl = element.querySelector('.help-block').textContent; + return sceneElements.map((element) => { + const siteUrl = element.querySelector('.recent-details-title .help-block, .model-details-title .site-name').textContent; - if (`www.${siteUrl.toLowerCase()}` !== new URL(site.url).host) { + if (filter && `www.${siteUrl.toLowerCase()}` !== new URL(site.url).host) { // different dogfart site - return acc; + return null; } const sceneLinkElement = element.querySelector('.thumbnail'); - const url = `https://dogfartnetwork.com${sceneLinkElement.href}`; + const url = qu.prefixUrl(sceneLinkElement.href, 'https://dogfartnetwork.com'); const { pathname } = new URL(url); const entryId = `${site.slug}_${pathname.split('/')[4]}`; const title = element.querySelector('.scene-title').textContent; - const actors = title.split(/[,&]|\band\b/).map(actor => actor.trim()); + const actors = title.split(/[,&]|\band\b/).map(actor => actor.replace(/BTS/i, '').trim()); const poster = `https:${element.querySelector('img').src}`; const teaser = sceneLinkElement.dataset.preview_clip_url; - return [ - ...acc, - { - url, - entryId, - title, - actors, - poster, - teaser: { - src: teaser, - }, - site, + const channel = siteUrl?.match(/(.*).com/)?.[1].toLowerCase(); + + return { + url, + entryId, + title, + actors, + poster, + teaser: { + src: teaser, }, - ]; - }, []); + site, + channel, + }; + }).filter(Boolean); } async function scrapeScene(html, url, site) { @@ -97,8 +99,8 @@ async function scrapeScene(html, url, site) { const poster = `https:${trailerElement.dataset.poster}`; const { trailer } = trailerElement.dataset; - const lastPhotosUrl = Array.from(document.querySelectorAll('.pagination a')).slice(-1)[0].href; - const photos = await getPhotos(`${origin}${pathname}${lastPhotosUrl}`, site, url); + const lastPhotosUrl = Array.from(document.querySelectorAll('.pagination a')).slice(-1)[0]?.href; + const photos = lastPhotosUrl ? await getPhotos(`${origin}${pathname}${lastPhotosUrl}`, site, url) : []; const stars = Math.floor(Number(document.querySelector('span[itemprop="average"]')?.textContent || document.querySelector('span[itemprop="ratingValue"]')?.textContent) / 2); const tags = Array.from(document.querySelectorAll('.scene-details .categories a')).map(({ textContent }) => textContent); @@ -137,7 +139,23 @@ async function fetchScene(url, site) { return scrapeScene(res.body.toString(), url, site); } +async function fetchProfile(baseActor, entity) { + const slug = slugify(baseActor.name, '+'); + const url = `https://www.dogfartnetwork.com/tour/girls/${slug}/`; + + const res = await http.get(url); + + if (res.ok) { + const scenes = scrapeLatest(res.body, entity, false); + + return { scenes }; + } + + return res.status; +} + module.exports = { fetchLatest, fetchScene, + fetchProfile, }; diff --git a/src/scrapers/nubiles.js b/src/scrapers/nubiles.js index 226e8965..9df9aae0 100644 --- a/src/scrapers/nubiles.js +++ b/src/scrapers/nubiles.js @@ -45,8 +45,9 @@ function scrapeAll(scenes, site, origin) { release.date = qu.date('.date', 'MMM D, YYYY'); release.actors = qu.all('.models a.model', true); - const poster = qu.q('img').dataset.original; - release.poster = [ + const poster = qu.sourceSet('img', 'data-srcset')?.[0]; + + release.poster = poster && [ poster.replace('_640', '_1280'), poster, ]; diff --git a/src/scrapers/scrapers.js b/src/scrapers/scrapers.js index 34795252..9dac647c 100644 --- a/src/scrapers/scrapers.js +++ b/src/scrapers/scrapers.js @@ -197,6 +197,7 @@ const scrapers = { devilsfilm: famedigital, digitalplayground, dtfsluts: fullpornnetwork, + dogfartnetwork: dogfart, dorcelclub: dorcel, doubleviewcasting: firstanalquest, elegantangel, diff --git a/src/utils/qu.js b/src/utils/qu.js index e6ce1eae..b49c0c89 100644 --- a/src/utils/qu.js +++ b/src/utils/qu.js @@ -253,7 +253,7 @@ function urls(context, selector = 'a', attr = 'href', { origin, protocol = 'http return attr ? urlEls.map(urlEl => prefixUrl(urlEl, origin, protocol)) : urlEls; } -function sourceSet(context, selector, attr, options = {}) { +function sourceSet(context, selector, attr = 'srcset', options = {}) { const srcset = q(context, selector, attr); if (!srcset) { @@ -265,11 +265,16 @@ function sourceSet(context, selector, attr, options = {}) { .map((source) => { const [link, descriptor] = source.split(' '); - return { - descriptor: descriptor || 'fallback', - url: prefixUrl(link, options.origin, options.protocol), - }; + if (link) { + return { + descriptor: descriptor || 'fallback', + url: prefixUrl(link, options.origin, options.protocol), + }; + } + + return null; }) + .filter(Boolean) .sort((sourceA, sourceB) => { if (sourceB.descriptor === 'fallback' || parseInt(sourceA.descriptor, 10) > parseInt(sourceB.descriptor, 10)) { return -1; diff --git a/webpack.config.js b/webpack.config.js index 7188a59d..9e7d17f8 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -79,6 +79,7 @@ module.exports = { theme: path.join(__dirname, 'assets/css/_theme.scss'), breakpoints: path.join(__dirname, 'assets/css/_breakpoints.scss'), config: path.join(__dirname, `assets/js/config/${process.env.NODE_ENV || 'default'}.js`), + vue: 'vue/dist/vue.esm-bundler.js', }, }, };