diff --git a/config/default.js b/config/default.js index 75d98ce0..f1554018 100755 --- a/config/default.js +++ b/config/default.js @@ -252,6 +252,7 @@ module.exports = { 'hitzefrei', 'porncz', 'czechav', + 'angelogodshackoriginal', 'littlecapricedreams', 'missyx', 'gangbangcreampie', diff --git a/seeds/02_sites.js b/seeds/02_sites.js index 95c3f160..77aa98a1 100755 --- a/seeds/02_sites.js +++ b/seeds/02_sites.js @@ -776,6 +776,13 @@ const sites = [ profile: 'http://www.american-pornstar.com/models', }, }, + // ANGELO GODSHACK ORIGINAL + { + slug: 'angelogodshackoriginal', + name: 'Angelo Godshack Original', + alias: ['ago', 'angelogodshackxxx', 'angelo godshack xxx'], + url: 'https://angelogodshackxxx.com', + }, // ARCH ANGEL { slug: 'archangel', diff --git a/src/scrapers/angelogodshackoriginal.js b/src/scrapers/angelogodshackoriginal.js new file mode 100644 index 00000000..59cf3436 --- /dev/null +++ b/src/scrapers/angelogodshackoriginal.js @@ -0,0 +1,96 @@ +'use strict'; + +const unprint = require('unprint'); + +function scrapeAll(scenes, channel) { + return scenes.map(({ query }) => { + const release = {}; + + release.url = query.url('a.video-container__description--title, a.video-container__image'); + release.entryId = new URL(release.url).pathname.split('/').at(-1); + + release.title = query.content('.video-container__description--title'); + + release.actors = query.all('.video-container__description--author a').map((actorEl) => ({ + name: unprint.query.content(actorEl), + url: unprint.query.url(actorEl, null, { origin: channel.url }), + })); + + const poster = query.img('.video-container__image img'); + + if (poster) { + release.poster = [ + poster.replace('/videoList', '/videoDetail2x'), + poster.replace('/videoList', '/videoDetail'), + poster, + ]; + } + + return release; + }); +} + +function scrapeScene({ query }, { url, entity }) { + const release = {}; + + release.entryId = new URL(url).pathname.split('/').at(-1); + + release.title = query.content('.video-detail__header--container h1'); + release.description = query.content('.description p'); + + release.actors = query.all('.video-detail__description--author a:not(.logo)').map((actorEl) => ({ + name: unprint.query.content(actorEl, '.title'), + url: unprint.query.url(actorEl, null, { origin: entity.url }), + })); + + release.poster = query.img('#video', { attribute: 'data-poster' }); + + release.photos = query.imgs('.gallery-slider img').map((source) => [ + source.replace('/galleryList', '/galleryDetail'), + source, + ]); + + release.trailer = query.videos('#video source')?.map((source) => ({ + src: source, + quality: (source.includes('4k') && 2160) + || (source.includes('1080') && 1080) + || (source.includes('720') && 720) // not observed, but just in case + || (source.includes('480') && 480), // not observed, but just in case + })); + + return release; +} + +function scrapeProfile({ query }) { + const profile = {}; + + profile.avatar = query.img('img.model-cover-photo'); + + return profile; +} + +async function fetchLatest(channel, page = 1) { + const res = await unprint.get(`${channel.url}/newest?page=${page}`, { selectAll: '.videos .video-container' }); + + if (res.ok) { + return scrapeAll(res.context, channel); + } + + return res.status; +} + +async function fetchProfile({ slug }, entity) { + const res = await unprint.get(`${entity.url}/model/${slug}`); + + if (res.ok) { + return scrapeProfile(res.context, entity); + } + + return res.status; +} + +module.exports = { + fetchLatest, + fetchProfile, + scrapeScene, +}; diff --git a/src/scrapers/scrapers.js b/src/scrapers/scrapers.js index df377d53..3d8882ad 100755 --- a/src/scrapers/scrapers.js +++ b/src/scrapers/scrapers.js @@ -1,6 +1,7 @@ 'use strict'; const adultempire = require('./adultempire'); +const angelogodshackoriginal = require('./angelogodshackoriginal'); const archangel = require('./archangel'); const assylum = require('./assylum'); const amateurallure = require('./amateurallure'); @@ -85,6 +86,7 @@ const scrapers = { americanpornstar, amateureuro: porndoe, amnesiac, + angelogodshackoriginal, archangel, asiam: modelmedia, assylum, @@ -188,6 +190,7 @@ const scrapers = { analbbc: fullpornnetwork, analized: fullpornnetwork, analviolation: fullpornnetwork, + angelogodshackoriginal, anilos: nubiles, archangel, asiam: modelmedia,