Refreshing entity slug cache in seeds. Added Hardwerk to Radical.

This commit is contained in:
DebaucheryLibrarian
2026-03-15 17:42:07 +01:00
parent 0560fac1ff
commit 0d30115ad5
6 changed files with 183 additions and 249 deletions

View File

@@ -2,6 +2,14 @@
const omit = require('object.omit'); const omit = require('object.omit');
const upsert = require('../src/utils/upsert'); const upsert = require('../src/utils/upsert');
const redis = require('../src/redis');
const entityPrefixes = {
channel: '',
network: '_',
studio: '*',
info: '@',
};
const grandParentNetworks = [ const grandParentNetworks = [
{ {
@@ -905,8 +913,7 @@ const networks = [
}, },
]; ];
exports.seed = (knex) => Promise.resolve() exports.seed = async (knex) => {
.then(async () => {
await Promise.all([].concat(grandParentNetworks, parentNetworks, networks).map(async (network) => { await Promise.all([].concat(grandParentNetworks, parentNetworks, networks).map(async (network) => {
if (network.rename) { if (network.rename) {
return knex('entities') return knex('entities')
@@ -981,4 +988,13 @@ exports.seed = (knex) => Promise.resolve()
.flat(); .flat();
await upsert('entities_tags', tagAssociations, ['entity_id', 'tag_id'], knex); await upsert('entities_tags', tagAssociations, ['entity_id', 'tag_id'], knex);
});
const entities = await knex('entities').select('id', 'slug', 'type');
await redis.connect();
await redis.del('traxxx:entities:id_by_slug');
await redis.hSet('traxxx:entities:id_by_slug', entities.map((entity) => [`${entityPrefixes[entity.type]}${entity.slug}`, entity.id]));
await redis.disconnect();
};

View File

@@ -1,4 +1,12 @@
const upsert = require('../src/utils/upsert'); const upsert = require('../src/utils/upsert');
const redis = require('../src/redis');
const entityPrefixes = {
channel: '',
network: '_',
studio: '*',
info: '@',
};
/* eslint-disable max-len */ /* eslint-disable max-len */
const sites = [ const sites = [
@@ -10554,6 +10562,18 @@ const sites = [
siteAsSerie: true, siteAsSerie: true,
}, },
}, },
{
name: 'Hardwerk',
slug: 'hardwerk',
url: 'https://hardwerk.com',
independent: true,
parent: 'radical',
parameters: {
endpoint: 'jC4SrjH8YVDtRejiA0PMx',
videos: 'films',
actors: 'performers',
},
},
// REALITY KINGS // REALITY KINGS
{ {
name: 'Look At Her Now', name: 'Look At Her Now',
@@ -15540,8 +15560,7 @@ sites.reduce((acc, site) => {
}, new Set()); }, new Set());
/* eslint-disable max-len */ /* eslint-disable max-len */
exports.seed = (knex) => Promise.resolve() exports.seed = async (knex) => {
.then(async () => {
await Promise.all(sites.map(async (channel) => { await Promise.all(sites.map(async (channel) => {
if (channel.rename) { if (channel.rename) {
await knex('entities') await knex('entities')
@@ -15611,124 +15630,16 @@ exports.seed = (knex) => Promise.resolve()
: [] : []
)).flat(); )).flat();
return upsert('entities_tags', tagAssociations, ['entity_id', 'tag_id'], knex); await upsert('entities_tags', tagAssociations, ['entity_id', 'tag_id'], knex);
});
const entities = await knex('entities').select('id', 'slug', 'type');
await redis.connect();
await redis.del('traxxx:entities:id_by_slug');
await redis.hSet('traxxx:entities:id_by_slug', entities.map((entity) => [`${entityPrefixes[entity.type]}${entity.slug}`, entity.id]));
await redis.disconnect();
};
exports.sites = sites; exports.sites = sites;
/*
'X-Art' => 'xart',
'met-art' => 'metart',
'18og' => '18OnlyGirls',
'a1o1' => 'Asian1on1',
'add' => 'ManualAddActors',
'analb' => 'AnalBeauty',
'bgonzo' => 'BangGonzo',
'btlbd' => 'BigTitsLikeBigDicks',
'bjf' => 'BlowjobFridays',
'cws' => 'CzechWifeSwap',
'Daughter' => 'DaughterSwap',
'Daughters' => 'DaughterSwap',
'dc' => 'DorcelVision',
'dpg' => 'DigitalPlayground',
'dsw' => 'DaughterSwap',
'faq' => 'FirstAnalQuest',
'ft' => 'FastTimes',
'fittingroom' => 'Fitting-Room',
'gbcp' => 'GangbangCreampie',
'hart' => 'Hegre',
'hegre-art' => 'Hegre',
'kha' => 'KarupsHA',
'kow' => 'KarupsOW',
'kpc' => 'KarupsPC',
'la' => 'LatinAdultery',
'lcd' => 'LittleCaprice',
'lhf' => 'LoveHerFeet',
'littlecapricedreams' => 'Little Caprice Dreams',
'maj' => 'ManoJob',
'mfl' => 'Mofos',
'mj' => 'ManoJob',
'mpov' => 'MrPOV',
'naughtyamericavr' => 'NaughtyAmerica',
'news' => 'NewSensations',
'ps' => 'PropertySex',
'sart' => 'SexArt',
'sbj' => 'StreetBlowjobs',
'sislove' => 'SisLovesMe',
'tds' => 'TheDickSuckers',
'these' => 'TheStripperExperience',
'tlc' => 'TeensLoveCream',
'tle' => 'TheLifeErotic',
'tog' => 'TonightsGirlfriend',
'wowg' => 'WowGirls',
'wy' => 'WebYoung',
'itc' => 'InTheCrack',
"abbw" => "AbbyWinters",
"abme" => "AbuseMe",
"ana" => "AnalAngels",
"atke" => "ATKExotics",
"atkg" => "ATKGalleria",
"atkgfs" => "ATKGirlfriends",
"atkh" => "ATKHairy",
"aktp" => "ATKPetites",
"ba" => "Beauty-Angels",
"bna" => "BrandNew",
"bam" => "BruceAndMorgan",
"bcast" => "BrutalCastings",
"bd" => "BrutalDildos",
"bpu" => "BrutalPickups",
"cza" => "CzhecAmateurs",
"czbb" => "CzechBangBus",
"czb" => "CzechBitch",
"cc" => "CzechCasting",
"czc" => "CzechCouples",
"czestro" => "CzechEstrogenolit",
"czf" => "CzechFantasy",
"czgb" => "CzechGangBang",
"cgfs" => "CzechGFS",
"czharem" => "CzechHarem",
"czm" => "CzechMassage",
"czo" => "CzechOrgasm",
"czps" => "CzechPawnShop",
"css" => "CzechStreets",
"cztaxi" => "CzechTaxi",
"czt" => "CzechTwins",
"dts" => "DeepThroatSirens",
"doan" => "DiaryOfANanny",
"ds" => "DungeonSex",
"ffr" => "FacialsForever",
"ff" => "FilthyFamily",
"fbbg" => "FirstBGG",
"fs" => "FuckStudies",
"tfcp" => "FullyClothedPissing",
"gdp" => "GirlsDoPorn",
"Harmony" => "HarmonyVision",
"hletee" => "HelplessTeens",
"jlmf" => "JessieLoadsMonsterFacials",
"lang" => "LANewGirl",
"mmp" => "MMPNetwork",
"mbc" => "MyBabysittersClub",
"nvg" => "NetVideoGirls",
"oo" => "Only-Opaques",
"os" => "Only-Secretaries",
"oss" => "OnlySilAndSatin",
"psus" => "PascalsSubSluts",
"psp" => "PorsntarsPunishment",
"pdmqfo" => "QuestForOrgasm",
"sed" => "SexualDisgrace",
"sislov" => "SisLovesMe",
"tslw" => "SlimeWave",
"stre" => "StrictRestraint",
"t18" => "Taboo18",
"tsma" => "TeenSexMania",
"tsm" => "TeenSexMovs",
"ttw" => "TeensInTheWoods",
"tgw" => "ThaiGirlsWild",
"taob" => "TheArtOfBlowJob",
"trwo" => "TheRealWorkout",
"tt" => "TryTeens",
"vp" => "VIPissy",
"wrh" => "WeAreHairy",
"yt" => "YoungThroats",
];
*/

View File

@@ -719,6 +719,11 @@ const affiliates = [
url: 'https://register.join-toughlovex.com/track/MzAwMDA5NzkuMy43Ni4xOTcuMC4wLjAuMC4w', url: 'https://register.join-toughlovex.com/track/MzAwMDA5NzkuMy43Ni4xOTcuMC4wLjAuMC4w',
comment: 'rev share', comment: 'rev share',
}, },
{
channel: 'hardwerk',
url: 'https://register.hardwerk.com/track/MzAwMDA5NzkuMy4xNTEuMzM5LjAuMC4wLjAuMA',
comment: 'rev share',
},
// radical > topwebmodels // radical > topwebmodels
{ {
network: 'topwebmodels', network: 'topwebmodels',

View File

@@ -140,6 +140,7 @@ module.exports = {
purgatoryx: radical, purgatoryx: radical,
topwebmodels: radical, topwebmodels: radical,
lucidflix: radical, lucidflix: radical,
hardwerk: radical,
// hush / hussiepass // hush / hussiepass
eyeontheguy: hush, eyeontheguy: hush,
hushpass: hush, hushpass: hush,

View File

@@ -215,7 +215,7 @@ function scrapeProfile(data, channel, scenes, parameters) {
async function fetchProfile(actor, { channel, parameters }) { async function fetchProfile(actor, { channel, parameters }) {
const endpoint = await fetchEndpoint(channel); const endpoint = await fetchEndpoint(channel);
const res = await http.get(`${channel.url}/_next/data/${endpoint}/models/${actor.slug}.json?slug=${actor.slug}`); const res = await http.get(`${channel.url}/_next/data/${endpoint}/${parameters.actors || 'models'}/${actor.slug}.json?slug=${actor.slug}`);
if (res.ok && res.body.pageProps?.model) { if (res.ok && res.body.pageProps?.model) {
return scrapeProfile(res.body.pageProps.model, channel, res.body.pageProps.model_contents, parameters); return scrapeProfile(res.body.pageProps.model, channel, res.body.pageProps.model_contents, parameters);

View File

@@ -153,6 +153,7 @@ const actors = [
{ entity: 'topwebmodels', name: 'Lexi Belle', fields: ['avatar', 'dateOfBirth', 'birthPlace', 'measurements', 'height', 'weight', 'eyes', 'hairColor'] }, { entity: 'topwebmodels', name: 'Lexi Belle', fields: ['avatar', 'dateOfBirth', 'birthPlace', 'measurements', 'height', 'weight', 'eyes', 'hairColor'] },
{ entity: 'purgatoryx', name: 'Kenzie Reeves', fields: ['avatar', 'description', 'gender', 'dateOfBirth', 'birthPlace', 'measurements', 'height', 'weight', 'eyes', 'hairColor'] }, { entity: 'purgatoryx', name: 'Kenzie Reeves', fields: ['avatar', 'description', 'gender', 'dateOfBirth', 'birthPlace', 'measurements', 'height', 'weight', 'eyes', 'hairColor'] },
{ entity: 'lucidflix', name: 'Ava Amira', fields: ['avatar', 'description', 'gender'] }, { entity: 'lucidflix', name: 'Ava Amira', fields: ['avatar', 'description', 'gender'] },
{ entity: 'hardwerk', name: 'Luna Silver', fields: ['avatar', 'gender'] },
// wankz // wankz
{ entity: 'wankzvr', name: 'Melody Marks', fields: ['avatar', 'gender', 'description', 'birthPlace', 'height', 'measurements', 'age'] }, { entity: 'wankzvr', name: 'Melody Marks', fields: ['avatar', 'gender', 'description', 'birthPlace', 'height', 'measurements', 'age'] },
{ entity: 'milfvr', name: 'Ember Snow', fields: ['avatar', 'gender', 'description', 'measurements', 'birthPlace', 'height', 'age'] }, { entity: 'milfvr', name: 'Ember Snow', fields: ['avatar', 'gender', 'description', 'measurements', 'birthPlace', 'height', 'age'] },