diff --git a/assets/js/networks/actions.js b/assets/js/networks/actions.js index 31382a6b..7748a950 100644 --- a/assets/js/networks/actions.js +++ b/assets/js/networks/actions.js @@ -10,6 +10,8 @@ function initNetworksActions(store, _router) { $limit:Int = 1000, $after:Date = "1900-01-01", $before:Date = "2100-01-01", + $afterTime:Datetime = "1900-01-01", + $beforeTime:Datetime = "2100-01-01", $orderBy: [ReleasesOrderBy!] $exclude: [String!] ) { @@ -70,10 +72,20 @@ function initNetworksActions(store, _router) { { network: { parent: { slug: { equalTo: $networkSlug } } } } ] } - date: { - lessThan: $before, - greaterThan: $after, - } + or: [ + { + date: { + lessThan: $before, + greaterThan: $after, + } + }, + { + createdAt: { + lessThan: $beforeTime, + greaterThan: $afterTime, + } + } + ], releasesTags: { none: { tag: { @@ -93,6 +105,8 @@ function initNetworksActions(store, _router) { limit, after: store.getters.after, before: store.getters.before, + afterTime: store.getters.after, + beforeTime: store.getters.before, orderBy: store.state.ui.range === 'upcoming' ? 'DATE_ASC' : 'DATE_DESC', exclude: store.state.ui.filter, }); diff --git a/public/img/logos/newsensations/ashlynnbrooke.png b/public/img/logos/newsensations/ashlynnbrooke.png new file mode 100644 index 00000000..537de4ae Binary files /dev/null and b/public/img/logos/newsensations/ashlynnbrooke.png differ diff --git a/public/img/logos/newsensations/favicon.png b/public/img/logos/newsensations/favicon.png new file mode 100644 index 00000000..98644a20 Binary files /dev/null and b/public/img/logos/newsensations/favicon.png differ diff --git a/public/img/logos/newsensations/fourfingerclub.png b/public/img/logos/newsensations/fourfingerclub.png new file mode 100644 index 00000000..18439b28 Binary files /dev/null and b/public/img/logos/newsensations/fourfingerclub.png differ diff --git a/public/img/logos/newsensations/freshouttahighschool.png b/public/img/logos/newsensations/freshouttahighschool.png new file mode 100644 index 00000000..e87958b2 Binary files /dev/null and b/public/img/logos/newsensations/freshouttahighschool.png differ diff --git a/public/img/logos/newsensations/heavyhandfuls.png b/public/img/logos/newsensations/heavyhandfuls.png new file mode 100644 index 00000000..64dd76ab Binary files /dev/null and b/public/img/logos/newsensations/heavyhandfuls.png differ diff --git a/public/img/logos/newsensations/hotwifexxx.png b/public/img/logos/newsensations/hotwifexxx.png new file mode 100644 index 00000000..92d3c5b4 Binary files /dev/null and b/public/img/logos/newsensations/hotwifexxx.png differ diff --git a/public/img/logos/newsensations/jizzbomb.png b/public/img/logos/newsensations/jizzbomb.png new file mode 100644 index 00000000..a68c7360 Binary files /dev/null and b/public/img/logos/newsensations/jizzbomb.png differ diff --git a/public/img/logos/newsensations/logo.png b/public/img/logos/newsensations/logo.png new file mode 100644 index 00000000..de7dd443 Binary files /dev/null and b/public/img/logos/newsensations/logo.png differ diff --git a/public/img/logos/newsensations/misc/ashlynn-brooke.jpg b/public/img/logos/newsensations/misc/ashlynn-brooke.jpg new file mode 100644 index 00000000..07b6d300 Binary files /dev/null and b/public/img/logos/newsensations/misc/ashlynn-brooke.jpg differ diff --git a/public/img/logos/newsensations/misc/shane-diesels-banging-babes.jpg b/public/img/logos/newsensations/misc/shane-diesels-banging-babes.jpg new file mode 100644 index 00000000..d6369753 Binary files /dev/null and b/public/img/logos/newsensations/misc/shane-diesels-banging-babes.jpg differ diff --git a/public/img/logos/newsensations/misc/tabu-tales.jpg b/public/img/logos/newsensations/misc/tabu-tales.jpg new file mode 100644 index 00000000..eb883106 Binary files /dev/null and b/public/img/logos/newsensations/misc/tabu-tales.jpg differ diff --git a/public/img/logos/newsensations/network.png b/public/img/logos/newsensations/network.png new file mode 100644 index 00000000..e865f1cc Binary files /dev/null and b/public/img/logos/newsensations/network.png differ diff --git a/public/img/logos/newsensations/nsfamilyxxx.png b/public/img/logos/newsensations/nsfamilyxxx.png new file mode 100644 index 00000000..840c918e Binary files /dev/null and b/public/img/logos/newsensations/nsfamilyxxx.png differ diff --git a/public/img/logos/newsensations/parodypass.png b/public/img/logos/newsensations/parodypass.png new file mode 100644 index 00000000..c3dc00ef Binary files /dev/null and b/public/img/logos/newsensations/parodypass.png differ diff --git a/public/img/logos/newsensations/shanedieselsbangingbabes.png b/public/img/logos/newsensations/shanedieselsbangingbabes.png new file mode 100644 index 00000000..57930b6a Binary files /dev/null and b/public/img/logos/newsensations/shanedieselsbangingbabes.png differ diff --git a/public/img/logos/newsensations/stretchedoutsnatch.png b/public/img/logos/newsensations/stretchedoutsnatch.png new file mode 100644 index 00000000..83a08e39 Binary files /dev/null and b/public/img/logos/newsensations/stretchedoutsnatch.png differ diff --git a/public/img/logos/newsensations/tabutales.png b/public/img/logos/newsensations/tabutales.png new file mode 100644 index 00000000..929c22d4 Binary files /dev/null and b/public/img/logos/newsensations/tabutales.png differ diff --git a/public/img/logos/newsensations/talesfromtheedge.png b/public/img/logos/newsensations/talesfromtheedge.png new file mode 100644 index 00000000..6f72800a Binary files /dev/null and b/public/img/logos/newsensations/talesfromtheedge.png differ diff --git a/public/img/logos/newsensations/thelesbianexperience.png b/public/img/logos/newsensations/thelesbianexperience.png new file mode 100644 index 00000000..abdc85aa Binary files /dev/null and b/public/img/logos/newsensations/thelesbianexperience.png differ diff --git a/public/img/logos/newsensations/theromanceseries.png b/public/img/logos/newsensations/theromanceseries.png new file mode 100644 index 00000000..f6b53379 Binary files /dev/null and b/public/img/logos/newsensations/theromanceseries.png differ diff --git a/public/img/logos/newsensations/unlimitedmilfs.png b/public/img/logos/newsensations/unlimitedmilfs.png new file mode 100644 index 00000000..264c3215 Binary files /dev/null and b/public/img/logos/newsensations/unlimitedmilfs.png differ diff --git a/seeds/01_networks.js b/seeds/01_networks.js index 923429d0..10082eee 100644 --- a/seeds/01_networks.js +++ b/seeds/01_networks.js @@ -227,6 +227,12 @@ const networks = [ url: 'https://www.naughtyamerica.com', description: 'The best porn movies daily at Naughty America! Experience the most seductive porn stars in stunning virtual reality, 4K and HD porn videos!', }, + { + slug: 'newsensations', + name: 'New Sensations', + url: 'https://www.newsensations.com', + description: 'Home to multiple award-winning studios New Sensations & Digital Sin with over 7,000 HQ porn movies! Take the free tour now!', + }, { slug: 'nubiles', name: 'Nubiles', diff --git a/seeds/02_sites.js b/seeds/02_sites.js index 0b5c14a4..c36fc62b 100644 --- a/seeds/02_sites.js +++ b/seeds/02_sites.js @@ -3074,6 +3074,121 @@ const sites = [ url: 'https://www.naughtyamerica.com/site/live-naughty-nurse', network: 'naughtyamerica', }, + // NEW SENSATIONS + { + slug: 'hotwifexxx', + name: 'Hotwife XXX', + url: 'https://www.hotwifexxx.com', + network: 'newsensations', + parameters: { + siteId: 'hwxxx', + block: true, + }, + }, + { + slug: 'tabutales', + name: 'Tabu Tales', + url: 'https://www.thetabutales.com', + network: 'newsensations', + parameters: { siteId: 'tt' }, + }, + { + slug: 'nsfamilyxxx', + name: 'Family XXX', + url: 'https://www.familyxxx.com', + network: 'newsensations', + tags: ['family'], + parameters: { + siteId: 'famxxx', + block: true, + }, + }, + { + slug: 'thelesbianexperience', + name: 'The Lesbian Experience', + url: 'https://www.thelesbianexperience.com', + network: 'newsensations', + tags: ['lesbian'], + parameters: { siteId: 'tle' }, + }, + { + slug: 'theromanceseries', + name: 'The Romance Series', + url: 'https://www.theromanceseries.com', + network: 'newsensations', + parameters: { siteId: 'rs' }, + }, + { + slug: 'talesfromtheedge', + name: 'Tales From The Edge', + url: 'thetalesfromtheedge', + network: 'newsensations', + parameters: { siteId: 'ttfte' }, + }, + { + slug: 'parodypass', + name: 'Parody Pass', + url: 'https://www.parodypass.com', + network: 'newsensations', + parameters: { siteId: 'pp' }, + }, + { + slug: 'shanedieselsbangingbabes', + name: 'Shane Diesel\'s Banging Babes', + url: 'http://shanedieselsbangingbabes.com', + network: 'newsensations', + parameters: { siteId: 'sdbb' }, + }, + { + slug: 'unlimitedmilfs', + name: 'Unlimited MILFs', + url: 'https://www.unlimitedmilfs.com', + network: 'newsensations', + tags: ['milf'], + parameters: { siteId: 'um' }, + }, + { + slug: 'heavyhandfuls', + name: 'Heavy Handfuls', + url: 'https://www.heavyhandfuls.com', + network: 'newsensations', + parameters: { siteId: 'hh' }, + }, + { + slug: 'jizzbomb', + name: 'Jizz Bomb', + url: 'https://www.jizzbomb.com', + network: 'newsensations', + parameters: { siteId: 'jb' }, + }, + { + slug: 'stretchedoutsnatch', + name: 'Stretched Out Snatch', + url: 'https://www.stretchedoutsnatch.com', + network: 'newsensations', + parameters: { siteId: 'sos' }, + }, + { + slug: 'fourfingerclub', + name: 'Four Finger Club', + url: 'https://www.fourfingerclub.com', + network: 'newsensations', + parameters: { siteId: 'ffc' }, + }, + { + slug: 'ashlynnbrooke', + name: 'Ashlynn Brooke', + url: 'https://www.ashlynnbrooke.com', + network: 'newsensations', + parameters: { siteId: 'ab' }, + }, + { + slug: 'freshouttahighschool', + name: 'Fresh Outta High School', + url: 'https://www.freshouttahighschool.com', + network: 'newsensations', + parameters: { siteId: 'fohs' }, + }, // NUBILES { slug: 'anilos', diff --git a/src/media.js b/src/media.js index 04cfe4bd..af69f04a 100644 --- a/src/media.js +++ b/src/media.js @@ -73,9 +73,7 @@ async function getEntropy(buffer) { } async function extractItem(source) { - const res = await bhttp.get(source.src, { - responseTimeout: 10000, - }); + const res = await bhttp.get(source.src); if (res.statusCode === 200) { const { q } = ex(res.body.toString()); @@ -116,9 +114,7 @@ async function fetchItem(source, index, existingItemsBySource, domain, role, att logger.verbose(`Fetching media item from ${source.src || source}`); - const res = await bhttp.get(source.src || source, { - responseTimeout: 10000, - }); + const res = await bhttp.get(source.src || source); if (res.statusCode === 200) { const { pathname } = new URL(source.src || source); diff --git a/src/scrapers/newsensations.js b/src/scrapers/newsensations.js new file mode 100644 index 00000000..36140306 --- /dev/null +++ b/src/scrapers/newsensations.js @@ -0,0 +1,78 @@ +'use strict'; + +const { geta, edate } = require('../utils/q'); + +function scrapeBlockLatest(scenes) { + return scenes.map(({ html, q, qa, qu, qt }) => { + const release = {}; + + const entryId = q('div[class*="videothumb"]', 'class').match(/videothumb_(\d+)/) + || q('div[id*="videothumb"]', 'id').match(/videothumb_(\d+)/); + + release.entryId = entryId[1]; + + release.title = q('h4 a', true); + release.url = qu('h4 a'); + release.date = edate(html, 'MM/DD/YYYY', /\d{2}\/\d{2}\/\d{4}/); + + release.actors = qa('.tour_update_models a', true); + + release.poster = q('div img').dataset.src; + release.photos = [q('div img', 'src0_4x') || q('div img', 'src0_3x') || q('div img', 'src0_2x')]; + + release.teaser = qt(); + + console.log(release); + + return release; + }); +} + +function scrapeClassicLatest(scenes) { + return scenes.map(({ el, q, qa, qd, qu }) => { + const release = {}; + + release.entryId = el.dataset.setid; + release.url = qu('a'); + + release.title = q('.update_title_small', true) || q('a:nth-child(2)', true); + + const description = q('a', 'title'); + if (description) release.description = description; + + const date = qd('.date_small, .update_date', 'MM/DD/YYYY'); + if (date) release.date = date; + + const durationLine = q('.update_counts', true); + if (durationLine) release.duration = Number(durationLine.match(/(\d+) min/i)[1]) * 60; + + const actors = qa('.update_models a', true); + release.actors = actors.length > 0 ? actors : q('.update_models', true).split(/,\s*/); + + const photoCount = q('.update_thumb', 'cnt'); + [release.poster, ...release.photos] = Array.from({ length: photoCount }).map((value, index) => q('.update_thumb', `src${index}_3x`) || q('.update_thumb', `src${index}_2x`) || q('.update_thumb', `src${index}_1x`)); + + console.log(release); + + return release; + }); +} + +async function fetchLatest(site, page = 1) { + if (!site.parameters) { + return null; + } + + const url = `${site.url}/tour_${site.parameters.siteId}/categories/movies_${page}_d.html`; + const qLatest = await geta(url, '.updatesBlock .movieBlock, .updatesBlock .videoBlock, .latest_updates_block .update_details, .category_listing_block .update_details'); + + if (qLatest && site.parameters.block) { + return scrapeBlockLatest(qLatest, site); + } + + return qLatest && scrapeClassicLatest(qLatest, site); +} + +module.exports = { + fetchLatest, +}; diff --git a/src/scrapers/scrapers.js b/src/scrapers/scrapers.js index 4f7c476d..21e2f646 100644 --- a/src/scrapers/scrapers.js +++ b/src/scrapers/scrapers.js @@ -36,6 +36,7 @@ const mindgeek = require('./mindgeek'); const mofos = require('./mofos'); const naturals = require('./21naturals'); const naughtyamerica = require('./naughtyamerica'); +const newsensations = require('./newsensations'); const nubiles = require('./nubiles'); const perfectgonzo = require('./perfectgonzo'); const pervcity = require('./pervcity'); @@ -93,6 +94,7 @@ module.exports = { mindgeek, mofos, naughtyamerica, + newsensations, nubiles, perfectgonzo, pervcity, diff --git a/src/utils/q.js b/src/utils/q.js index 7bb0a1fc..11388608 100644 --- a/src/utils/q.js +++ b/src/utils/q.js @@ -12,11 +12,17 @@ function extractDate(dateString, format, match) { if (match) { const dateStamp = trim(dateString).match(match); - if (dateStamp) return moment.utc(dateStamp[0], format).toDate(); + if (dateStamp) { + const date = moment.utc(dateStamp[0], format); + + return date.isValid() ? date.toDate() : null; + } return null; } - return moment.utc(trim(dateString), format).toDate(); + const date = moment.utc(trim(dateString), format); + + return date.isValid() ? date.toDate() : null; } function formatDate(date, format, inputFormat) {