Refreshing entity slug cache in seeds. Added Hardwerk to Radical.
This commit is contained in:
@@ -2,6 +2,14 @@
|
||||
const omit = require('object.omit');
|
||||
|
||||
const upsert = require('../src/utils/upsert');
|
||||
const redis = require('../src/redis');
|
||||
|
||||
const entityPrefixes = {
|
||||
channel: '',
|
||||
network: '_',
|
||||
studio: '*',
|
||||
info: '@',
|
||||
};
|
||||
|
||||
const grandParentNetworks = [
|
||||
{
|
||||
@@ -905,8 +913,7 @@ const networks = [
|
||||
},
|
||||
];
|
||||
|
||||
exports.seed = (knex) => Promise.resolve()
|
||||
.then(async () => {
|
||||
exports.seed = async (knex) => {
|
||||
await Promise.all([].concat(grandParentNetworks, parentNetworks, networks).map(async (network) => {
|
||||
if (network.rename) {
|
||||
return knex('entities')
|
||||
@@ -981,4 +988,13 @@ exports.seed = (knex) => Promise.resolve()
|
||||
.flat();
|
||||
|
||||
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();
|
||||
};
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
const upsert = require('../src/utils/upsert');
|
||||
const redis = require('../src/redis');
|
||||
|
||||
const entityPrefixes = {
|
||||
channel: '',
|
||||
network: '_',
|
||||
studio: '*',
|
||||
info: '@',
|
||||
};
|
||||
|
||||
/* eslint-disable max-len */
|
||||
const sites = [
|
||||
@@ -10554,6 +10562,18 @@ const sites = [
|
||||
siteAsSerie: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'Hardwerk',
|
||||
slug: 'hardwerk',
|
||||
url: 'https://hardwerk.com',
|
||||
independent: true,
|
||||
parent: 'radical',
|
||||
parameters: {
|
||||
endpoint: 'jC4SrjH8YVDtRejiA0PMx',
|
||||
videos: 'films',
|
||||
actors: 'performers',
|
||||
},
|
||||
},
|
||||
// REALITY KINGS
|
||||
{
|
||||
name: 'Look At Her Now',
|
||||
@@ -15540,8 +15560,7 @@ sites.reduce((acc, site) => {
|
||||
}, new Set());
|
||||
|
||||
/* eslint-disable max-len */
|
||||
exports.seed = (knex) => Promise.resolve()
|
||||
.then(async () => {
|
||||
exports.seed = async (knex) => {
|
||||
await Promise.all(sites.map(async (channel) => {
|
||||
if (channel.rename) {
|
||||
await knex('entities')
|
||||
@@ -15611,124 +15630,16 @@ exports.seed = (knex) => Promise.resolve()
|
||||
: []
|
||||
)).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;
|
||||
|
||||
/*
|
||||
'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",
|
||||
];
|
||||
*/
|
||||
|
||||
@@ -719,6 +719,11 @@ const affiliates = [
|
||||
url: 'https://register.join-toughlovex.com/track/MzAwMDA5NzkuMy43Ni4xOTcuMC4wLjAuMC4w',
|
||||
comment: 'rev share',
|
||||
},
|
||||
{
|
||||
channel: 'hardwerk',
|
||||
url: 'https://register.hardwerk.com/track/MzAwMDA5NzkuMy4xNTEuMzM5LjAuMC4wLjAuMA',
|
||||
comment: 'rev share',
|
||||
},
|
||||
// radical > topwebmodels
|
||||
{
|
||||
network: 'topwebmodels',
|
||||
|
||||
@@ -140,6 +140,7 @@ module.exports = {
|
||||
purgatoryx: radical,
|
||||
topwebmodels: radical,
|
||||
lucidflix: radical,
|
||||
hardwerk: radical,
|
||||
// hush / hussiepass
|
||||
eyeontheguy: hush,
|
||||
hushpass: hush,
|
||||
|
||||
@@ -215,7 +215,7 @@ function scrapeProfile(data, channel, scenes, parameters) {
|
||||
|
||||
async function fetchProfile(actor, { channel, parameters }) {
|
||||
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) {
|
||||
return scrapeProfile(res.body.pageProps.model, channel, res.body.pageProps.model_contents, parameters);
|
||||
|
||||
@@ -153,6 +153,7 @@ const actors = [
|
||||
{ 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: 'lucidflix', name: 'Ava Amira', fields: ['avatar', 'description', 'gender'] },
|
||||
{ entity: 'hardwerk', name: 'Luna Silver', fields: ['avatar', 'gender'] },
|
||||
// wankz
|
||||
{ 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'] },
|
||||
|
||||
Reference in New Issue
Block a user