Moved site tags from tag seed to site seed.

This commit is contained in:
ThePendulum 2020-02-12 02:19:43 +01:00
parent 86eba83fd3
commit fa30366ea4
4 changed files with 60 additions and 77 deletions

View File

@ -1395,10 +1395,6 @@ function getTagAliases(tagsMap) {
name: 'mmf', name: 'mmf',
alias_for: tagsMap.mfm, alias_for: tagsMap.mfm,
}, },
{
name: 'mff',
alias_for: tagsMap.fmf,
},
{ {
name: 'mature & milf', name: 'mature & milf',
alias_for: tagsMap.milf, alias_for: tagsMap.milf,
@ -1614,53 +1610,6 @@ function getTagAliases(tagsMap) {
]; ];
} }
function getSiteTags() {
return {
allblackx: ['ebony', 'bbc'],
bigdicksatschool: ['gay'],
boundgods: ['gay'],
buttmachineboys: ['gay'],
cum4k: ['fake-cum', 'creampie', '4k'],
darkx: ['interracial'],
deepthroatlove: ['blowjob', 'deepthroat'],
devianthardcore: ['bdsm'],
divinebitches: ['femdom'],
dpparodies: ['parody'],
drillmyhole: ['gay'],
eighteenyearsold: ['teen'],
exotic4k: ['4k'],
familyhookups: ['family'],
familystrokes: ['family'],
girlgrind: ['lesbian'],
girlsway: ['lesbian'],
givemepink: ['solo', 'masturbation'],
godsofmen: ['gay'],
iconmale: ['gay'],
jizzorgy: ['gay'],
kinkyspa: ['massage'],
lesbianx: ['lesbian'],
lubed: ['oil'],
massagecreep: ['massage'],
menofuk: ['gay'],
menonedge: ['gay'],
povd: ['pov'],
puremature: ['milf'],
spermswap: ['cum-swapping'],
spyfam: ['family'],
str8togay: ['gay'],
submissived: ['bdsm'],
swallowed: ['blowjob', 'deepthroat', 'facefucking'],
teenallanal: ['anal', 'mff'],
teenbff: ['mff'],
thegayoffice: ['gay'],
tiny4k: ['4k'],
toptobottom: ['gay'],
transangels: ['transsexual'],
trueanal: ['anal'],
tspussyhunters: ['transsexual'],
};
}
exports.seed = knex => Promise.resolve() exports.seed = knex => Promise.resolve()
.then(async () => upsert('tags_groups', groups, 'slug', knex)) .then(async () => upsert('tags_groups', groups, 'slug', knex))
.then(async () => { .then(async () => {
@ -1678,21 +1627,4 @@ exports.seed = knex => Promise.resolve()
const tagAliases = getTagAliases(tagsMap); const tagAliases = getTagAliases(tagsMap);
return upsert('tags', tagAliases, 'name'); return upsert('tags', tagAliases, 'name');
})
.then(async () => {
const siteTags = getSiteTags();
const sites = await knex('sites').whereIn('slug', Object.keys(siteTags));
const tags = await knex('tags').whereIn('slug', Object.values(siteTags).flat());
const tagsMap = tags.reduce((acc, tag) => ({ ...acc, [tag.slug]: tag.id }), {});
const tagAssociations = sites
.map(site => siteTags[site.slug].map(tagSlug => ({
tag_id: tagsMap[tagSlug],
site_id: site.id,
inherit: true,
})))
.flat();
return upsert('sites_tags', tagAssociations, ['tag_id', 'site_id']);
}); });

View File

@ -301,6 +301,7 @@ const sites = [
url: 'https://www.assylum.com', url: 'https://www.assylum.com',
description: 'At Assylum, submissive girls get dominated with rough anal sex, ass to mouth, hard BDSM, and sexual humiliation and degradation.', description: 'At Assylum, submissive girls get dominated with rough anal sex, ass to mouth, hard BDSM, and sexual humiliation and degradation.',
network: 'assylum', network: 'assylum',
tags: ['bdsm'],
parameters: { parameters: {
a: 68, a: 68,
}, },
@ -311,6 +312,7 @@ const sites = [
url: 'https://www.slavemouth.com', url: 'https://www.slavemouth.com',
description: 'Submissive girls get their mouths punished hard by Dr. Mercies, with facefucking, gagging, frozen cum bukkake, face bondage, ass eating, and sexual degradation.', description: 'Submissive girls get their mouths punished hard by Dr. Mercies, with facefucking, gagging, frozen cum bukkake, face bondage, ass eating, and sexual degradation.',
network: 'assylum', network: 'assylum',
tags: ['bdsm'],
parameters: { parameters: {
a: 183, a: 183,
}, },
@ -1301,6 +1303,7 @@ const sites = [
name: 'DP Parodies', name: 'DP Parodies',
url: 'https://www.digitalplayground.com/scenes?site=212', url: 'https://www.digitalplayground.com/scenes?site=212',
description: '', description: '',
tags: ['parody'],
network: 'digitalplayground', network: 'digitalplayground',
}, },
// DOGFART NETWORK // DOGFART NETWORK
@ -1724,6 +1727,7 @@ const sites = [
name: 'Girlsway', name: 'Girlsway',
url: 'https://www.girlsway.com', url: 'https://www.girlsway.com',
description: 'Girlsway.com has the best lesbian porn videos online! The hottest pornstars & first time lesbians in real girl on girl sex, tribbing, squirting & pussy licking action right HERE!', description: 'Girlsway.com has the best lesbian porn videos online! The hottest pornstars & first time lesbians in real girl on girl sex, tribbing, squirting & pussy licking action right HERE!',
tags: ['lesbian'],
network: 'girlsway', network: 'girlsway',
parameters: { parameters: {
scene: 'https://www.girlsway.com/en/video/girlsway', scene: 'https://www.girlsway.com/en/video/girlsway',
@ -1864,6 +1868,7 @@ const sites = [
name: 'Bound Gods', name: 'Bound Gods',
url: 'https://www.kink.com/channel/boundgods', url: 'https://www.kink.com/channel/boundgods',
description: 'Muscle Studs Are Bound, Gagged & Spread For A Deep Cock Pounding. Not even the most rock hard muscled studs can escape punishment & submission on BoundGods.com Watch the hottest studs get tied down, fucked & submitted.', description: 'Muscle Studs Are Bound, Gagged & Spread For A Deep Cock Pounding. Not even the most rock hard muscled studs can escape punishment & submission on BoundGods.com Watch the hottest studs get tied down, fucked & submitted.',
tags: ['gay'],
network: 'kink', network: 'kink',
}, },
{ {
@ -1885,6 +1890,7 @@ const sites = [
name: 'Butt Machine Boys', name: 'Butt Machine Boys',
url: 'https://www.kink.com/channel/buttmachineboys', url: 'https://www.kink.com/channel/buttmachineboys',
description: 'Powerful Fucking Machines Pound Hot Men Hard & Deep.', description: 'Powerful Fucking Machines Pound Hot Men Hard & Deep.',
tags: ['gay'],
network: 'kink', network: 'kink',
}, },
{ {
@ -1899,6 +1905,7 @@ const sites = [
name: 'Divine Bitches', name: 'Divine Bitches',
url: 'https://www.kink.com/channel/divinebitches', url: 'https://www.kink.com/channel/divinebitches',
description: 'Beautiful Women Dominate Submissive Men With Pain, Humiliation And Strap-On Fucking. The best in femdom and bondage. Men on Divine Bitches respond with obedience, ass worship, cunt worship, oral servitude, pantyhose worship, and foot worship.', description: 'Beautiful Women Dominate Submissive Men With Pain, Humiliation And Strap-On Fucking. The best in femdom and bondage. Men on Divine Bitches respond with obedience, ass worship, cunt worship, oral servitude, pantyhose worship, and foot worship.',
tags: ['femdom'],
network: 'kink', network: 'kink',
}, },
{ {
@ -1983,6 +1990,7 @@ const sites = [
name: 'Men on Edge', name: 'Men on Edge',
url: 'https://www.kink.com/channel/menonedge', url: 'https://www.kink.com/channel/menonedge',
description: "Hot Guys Begging To Cum Are Brought To The Edge Of Complete Submission And Allowed To Blow Their Loads. Men on Edge has perfected the art of gay BDSM & edging porn. Watch straight men bound up & edged by dominant gay pornstars until they can't help but cum!", description: "Hot Guys Begging To Cum Are Brought To The Edge Of Complete Submission And Allowed To Blow Their Loads. Men on Edge has perfected the art of gay BDSM & edging porn. Watch straight men bound up & edged by dominant gay pornstars until they can't help but cum!",
tags: ['gay'],
network: 'kink', network: 'kink',
}, },
{ {
@ -2039,6 +2047,7 @@ const sites = [
name: 'TS Pussy Hunters', name: 'TS Pussy Hunters',
url: 'https://www.kink.com/channel/tspussyhunters', url: 'https://www.kink.com/channel/tspussyhunters',
description: 'Hot TS cocks prey on the wet pussies of submissive ladies who are fucked hard till they cum. Dominant TS femme fatales with the hardest dicks, the softest tits, and the worst intentions dominate, bind, and punish bitches on the ultimate transfucking porn site.', description: 'Hot TS cocks prey on the wet pussies of submissive ladies who are fucked hard till they cum. Dominant TS femme fatales with the hardest dicks, the softest tits, and the worst intentions dominate, bind, and punish bitches on the ultimate transfucking porn site.',
tags: ['transsexual'],
network: 'kink', network: 'kink',
}, },
{ {
@ -2092,6 +2101,7 @@ const sites = [
url: 'https://www.devianthardcore.com', url: 'https://www.devianthardcore.com',
description: '', description: '',
parameters: { siteId: 305 }, parameters: { siteId: 305 },
tags: ['bdsm'],
network: 'metrohd', network: 'metrohd',
}, },
{ {
@ -2108,13 +2118,14 @@ const sites = [
url: 'https://www.familyhookups.com', url: 'https://www.familyhookups.com',
description: '', description: '',
parameters: { siteId: 307 }, parameters: { siteId: 307 },
tags: ['family'],
network: 'metrohd', network: 'metrohd',
}, },
{ {
slug: 'kinkyspa', slug: 'kinkyspa',
name: 'Kinky Spa', name: 'Kinky Spa',
url: 'https://www.kinkyspa.com', url: 'https://www.kinkyspa.com',
description: '', tags: ['massage'],
parameters: { siteId: 308 }, parameters: { siteId: 308 },
network: 'metrohd', network: 'metrohd',
}, },
@ -2124,6 +2135,7 @@ const sites = [
url: 'https://www.girlgrind.com', url: 'https://www.girlgrind.com',
description: '', description: '',
parameters: { siteId: 309 }, parameters: { siteId: 309 },
tags: ['lesbian'],
network: 'metrohd', network: 'metrohd',
}, },
// MEN // MEN
@ -2133,6 +2145,7 @@ const sites = [
url: 'https://www.bigdicksatschool.com', url: 'https://www.bigdicksatschool.com',
description: '', description: '',
parameters: { siteId: 252 }, parameters: { siteId: 252 },
tags: ['gay'],
network: 'men', network: 'men',
}, },
{ {
@ -2141,13 +2154,14 @@ const sites = [
url: 'https://www.drillmyhole.com', url: 'https://www.drillmyhole.com',
description: '', description: '',
parameters: { siteId: 253 }, parameters: { siteId: 253 },
tags: ['gay'],
network: 'men', network: 'men',
}, },
{ {
slug: 'str8togay', slug: 'str8togay',
name: 'Str8 to Gay', name: 'Str8 to Gay',
url: 'https://www.str8togay.com', url: 'https://www.str8togay.com',
description: '', tags: ['gay'],
parameters: { siteId: 254 }, parameters: { siteId: 254 },
network: 'men', network: 'men',
}, },
@ -2155,7 +2169,7 @@ const sites = [
slug: 'thegayoffice', slug: 'thegayoffice',
name: 'The Gay Office', name: 'The Gay Office',
url: 'https://www.thegayoffice.com', url: 'https://www.thegayoffice.com',
description: '', tags: ['gay'],
parameters: { siteId: 255 }, parameters: { siteId: 255 },
network: 'men', network: 'men',
}, },
@ -2163,7 +2177,7 @@ const sites = [
slug: 'jizzorgy', slug: 'jizzorgy',
name: 'Jizz Orgy', name: 'Jizz Orgy',
url: 'https://www.jizzorgy.com', url: 'https://www.jizzorgy.com',
description: '', tags: ['gay'],
parameters: { siteId: 256 }, parameters: { siteId: 256 },
network: 'men', network: 'men',
}, },
@ -2171,7 +2185,7 @@ const sites = [
slug: 'menofuk', slug: 'menofuk',
name: 'Men of UK', name: 'Men of UK',
url: 'https://www.menofuk.com', url: 'https://www.menofuk.com',
description: '', tags: ['gay'],
parameters: { siteId: 258 }, parameters: { siteId: 258 },
network: 'men', network: 'men',
}, },
@ -2179,7 +2193,7 @@ const sites = [
slug: 'toptobottom', slug: 'toptobottom',
name: 'Top to Bottom', name: 'Top to Bottom',
url: 'https://www.toptobottom.com', url: 'https://www.toptobottom.com',
description: '', tags: ['gay'],
parameters: { siteId: 259 }, parameters: { siteId: 259 },
network: 'men', network: 'men',
}, },
@ -2187,7 +2201,7 @@ const sites = [
slug: 'godsofmen', slug: 'godsofmen',
name: 'Gods of Men', name: 'Gods of Men',
url: 'https://www.godsofmen.com', url: 'https://www.godsofmen.com',
description: '', tags: ['gay'],
parameters: { siteId: 260 }, parameters: { siteId: 260 },
network: 'men', network: 'men',
}, },
@ -2204,7 +2218,7 @@ const sites = [
slug: 'transangels', slug: 'transangels',
name: 'TransAngels', name: 'TransAngels',
url: 'https://www.transangels.com', url: 'https://www.transangels.com',
description: '', tags: ['transsexual'],
parameters: { native: true }, parameters: { native: true },
network: 'mindgeek', network: 'mindgeek',
}, },
@ -2222,6 +2236,7 @@ const sites = [
name: 'True Anal', name: 'True Anal',
url: 'https://trueanal.com', url: 'https://trueanal.com',
description: 'TrueAnal is the hottest site with all hardcore Anal content and only the most popular pornstars getting their asses pounded and gapped with huge cock and more!', description: 'TrueAnal is the hottest site with all hardcore Anal content and only the most popular pornstars getting their asses pounded and gapped with huge cock and more!',
tags: ['anal'],
network: 'mikeadriano', network: 'mikeadriano',
}, },
{ {
@ -2229,6 +2244,7 @@ const sites = [
name: 'All Anal', name: 'All Anal',
url: 'https://allanal.com', url: 'https://allanal.com',
description: 'Popular babes getting their tight asses filled with cock! Pure anal fucking only at AllAnal!', description: 'Popular babes getting their tight asses filled with cock! Pure anal fucking only at AllAnal!',
tags: ['anal', 'mff'],
network: 'mikeadriano', network: 'mikeadriano',
}, },
{ {
@ -2243,6 +2259,7 @@ const sites = [
name: 'Swallowed', name: 'Swallowed',
url: 'https://swallowed.com', url: 'https://swallowed.com',
description: 'Swallowed is a Premium adult website for the hottest Blowjobs content online with only the most popular pornstars swallowing cock!', description: 'Swallowed is a Premium adult website for the hottest Blowjobs content online with only the most popular pornstars swallowing cock!',
tags: ['blowjob', 'deepthroat', 'facefucking'],
network: 'mikeadriano', network: 'mikeadriano',
}, },
// MILE HIGH MEDIA // MILE HIGH MEDIA
@ -2284,6 +2301,7 @@ const sites = [
slug: 'iconmale', slug: 'iconmale',
name: 'Icon Male', name: 'Icon Male',
url: 'https://www.iconmale.com', url: 'https://www.iconmale.com',
tags: ['gay'],
parameters: { native: true }, parameters: { native: true },
network: 'milehighmedia', network: 'milehighmedia',
}, },
@ -2776,6 +2794,7 @@ const sites = [
slug: 'givemepink', slug: 'givemepink',
name: 'Give Me Pink', name: 'Give Me Pink',
url: 'https://givemepink.com', url: 'https://givemepink.com',
tags: ['solo', 'masturbation'],
network: 'perfectgonzo', network: 'perfectgonzo',
}, },
{ {
@ -2800,6 +2819,7 @@ const sites = [
slug: 'spermswap', slug: 'spermswap',
name: 'Sperm Swap', name: 'Sperm Swap',
url: 'https://spermswap.com', url: 'https://spermswap.com',
tags: ['cum-swapping'],
network: 'perfectgonzo', network: 'perfectgonzo',
}, },
{ {
@ -2860,24 +2880,28 @@ const sites = [
name: '18 Years Old', name: '18 Years Old',
slug: 'eighteenyearsold', slug: 'eighteenyearsold',
url: 'https://pornpros.com/site/18yearsold', url: 'https://pornpros.com/site/18yearsold',
tags: ['teen'],
network: 'pornpros', network: 'pornpros',
}, },
{ {
name: 'Massage Creep', name: 'Massage Creep',
slug: 'massagecreep', slug: 'massagecreep',
url: 'https://pornpros.com/site/massagecreep', url: 'https://pornpros.com/site/massagecreep',
tags: ['massage'],
network: 'pornpros', network: 'pornpros',
}, },
{ {
name: 'Deep Throat Love', name: 'Deep Throat Love',
slug: 'deepthroatlove', slug: 'deepthroatlove',
url: 'https://pornpros.com/site/deepthroatlove', url: 'https://pornpros.com/site/deepthroatlove',
tags: ['blowjob', 'deepthroat'],
network: 'pornpros', network: 'pornpros',
}, },
{ {
name: 'Teen BFF', name: 'Teen BFF',
slug: 'teenbff', slug: 'teenbff',
url: 'https://pornpros.com/site/teenbff', url: 'https://pornpros.com/site/teenbff',
tags: ['mff'],
network: 'pornpros', network: 'pornpros',
}, },
{ {
@ -2950,24 +2974,28 @@ const sites = [
name: 'Cum 4K', name: 'Cum 4K',
slug: 'cum4k', slug: 'cum4k',
url: 'https://cum4k.com', url: 'https://cum4k.com',
tags: ['fake-cum', 'creampie', '4k'],
network: 'pornpros', network: 'pornpros',
}, },
{ {
name: 'Tiny 4K', name: 'Tiny 4K',
slug: 'tiny4k', slug: 'tiny4k',
url: 'https://tiny4k.com', url: 'https://tiny4k.com',
tags: ['4k'],
network: 'pornpros', network: 'pornpros',
}, },
{ {
name: 'POVD', name: 'POVD',
slug: 'povd', slug: 'povd',
url: 'https://povd.com', url: 'https://povd.com',
tags: ['pov'],
network: 'pornpros', network: 'pornpros',
}, },
{ {
name: 'Lubed', name: 'Lubed',
slug: 'lubed', slug: 'lubed',
url: 'https://lubed.com', url: 'https://lubed.com',
tags: ['oil'],
network: 'pornpros', network: 'pornpros',
}, },
{ {
@ -2998,6 +3026,7 @@ const sites = [
name: 'Pure Mature', name: 'Pure Mature',
slug: 'puremature', slug: 'puremature',
url: 'https://puremature.com', url: 'https://puremature.com',
tags: ['milf'],
network: 'pornpros', network: 'pornpros',
}, },
{ {
@ -3010,12 +3039,14 @@ const sites = [
name: 'Spy Fam', name: 'Spy Fam',
slug: 'spyfam', slug: 'spyfam',
url: 'https://spyfam.com', url: 'https://spyfam.com',
tags: ['family'],
network: 'pornpros', network: 'pornpros',
}, },
{ {
name: 'Exotic 4K', name: 'Exotic 4K',
slug: 'exotic4k', slug: 'exotic4k',
url: 'https://exotic4k.com', url: 'https://exotic4k.com',
tags: ['4k'],
network: 'pornpros', network: 'pornpros',
}, },
{ {
@ -4365,6 +4396,7 @@ const sites = [
name: 'Submissived', name: 'Submissived',
description: '', description: '',
url: 'https://www.submissived.com', url: 'https://www.submissived.com',
tags: ['bdsm'],
parameters: { scraper: 'A' }, parameters: { scraper: 'A' },
network: 'teamskeet', network: 'teamskeet',
}, },
@ -4374,6 +4406,7 @@ const sites = [
description: '', description: '',
url: 'https://www.familystrokes.com', url: 'https://www.familystrokes.com',
parameters: { scraper: 'A' }, parameters: { scraper: 'A' },
tags: ['family'],
network: 'teamskeet', network: 'teamskeet',
}, },
// TWISTYS // TWISTYS
@ -4694,6 +4727,7 @@ const sites = [
name: 'DarkX', name: 'DarkX',
description: 'Watch interracial BBC porn videos on DarkX.com, featuring the best pornstars taking big black cock in exclusive scenes. The best black on white porn inside!', description: 'Watch interracial BBC porn videos on DarkX.com, featuring the best pornstars taking big black cock in exclusive scenes. The best black on white porn inside!',
url: 'https://www.darkx.com', url: 'https://www.darkx.com',
tags: ['interracial'],
network: 'xempire', network: 'xempire',
}, },
{ {
@ -4702,12 +4736,14 @@ const sites = [
description: 'AllBlackX.com features the hottest ebony pornstar beauties in hardcore black on black gonzo porn. From director Mason, watch 4k ultra HD videos inside', description: 'AllBlackX.com features the hottest ebony pornstar beauties in hardcore black on black gonzo porn. From director Mason, watch 4k ultra HD videos inside',
url: 'https://www.allblackx.com', url: 'https://www.allblackx.com',
network: 'xempire', network: 'xempire',
tags: ['ebony', 'bbc'],
}, },
{ {
slug: 'lesbianx', slug: 'lesbianx',
name: 'LesbianX', name: 'LesbianX',
description: "LesbianX.com features today's top pornstars in hardcore lesbian porn. Watch passionate & intense girl on girl sex videos, from erotic kissing to pussy licking.", description: "LesbianX.com features today's top pornstars in hardcore lesbian porn. Watch passionate & intense girl on girl sex videos, from erotic kissing to pussy licking.",
url: 'https://www.lesbianx.com', url: 'https://www.lesbianx.com',
tags: ['lesbian'],
network: 'xempire', network: 'xempire',
}, },
]; ];
@ -4718,6 +4754,9 @@ exports.seed = knex => Promise.resolve()
const networks = await knex('networks').select('*'); const networks = await knex('networks').select('*');
const networksMap = networks.reduce((acc, { id, slug }) => ({ ...acc, [slug]: id }), {}); const networksMap = networks.reduce((acc, { id, slug }) => ({ ...acc, [slug]: id }), {});
const tags = await knex('tags').select('*').where('alias_for', null);
const tagsMap = tags.reduce((acc, { id, slug }) => ({ ...acc, [slug]: id }), {});
const sitesWithNetworks = sites.map(site => ({ const sitesWithNetworks = sites.map(site => ({
slug: site.slug, slug: site.slug,
name: site.name, name: site.name,
@ -4730,5 +4769,17 @@ exports.seed = knex => Promise.resolve()
show: site.show, show: site.show,
})); }));
return upsert('sites', sitesWithNetworks, 'slug', knex); const { inserted, updated } = await upsert('sites', sitesWithNetworks, 'slug', knex);
const sitesMap = [].concat(inserted, updated).reduce((acc, { id, slug }) => ({ ...acc, [slug]: id }), {});
const tagAssociations = sites.map(site => (site.tags
? site.tags.map(tagSlug => ({
site_id: sitesMap[site.slug],
tag_id: tagsMap[tagSlug],
inherit: true,
}))
: []
)).flat();
return upsert('sites_tags', tagAssociations, ['site_id', 'tag_id'], knex);
}); });