Refactored various modules for entities. Updated and refactored Kink scraper.
This commit is contained in:
@@ -21,6 +21,10 @@ const parentNetworks = [
|
||||
slug: 'whalemember',
|
||||
name: 'Whale Member',
|
||||
},
|
||||
{
|
||||
slug: 'wgcz',
|
||||
name: 'WGCZ Holding',
|
||||
},
|
||||
];
|
||||
|
||||
const networks = [
|
||||
@@ -98,6 +102,7 @@ const networks = [
|
||||
name: 'Bang Bros',
|
||||
url: 'https://bangbros.com',
|
||||
description: 'Here at Bang Bros, we only film the best highest quality porn with the sexiest Amateur girls and the top pornstars. Updated daily on Bangbros.com.',
|
||||
parent: 'wgcz',
|
||||
},
|
||||
{
|
||||
slug: 'blowpass',
|
||||
@@ -120,7 +125,7 @@ const networks = [
|
||||
slug: 'boobpedia',
|
||||
name: 'Boobpedia',
|
||||
url: 'https://www.boobpedia.com',
|
||||
type: 4,
|
||||
type: 'info',
|
||||
},
|
||||
{
|
||||
slug: 'burningangel',
|
||||
@@ -142,13 +147,14 @@ const networks = [
|
||||
slug: 'freeones',
|
||||
name: 'FreeOnes',
|
||||
url: 'https://www.freeones.com',
|
||||
type: 4,
|
||||
type: 'info',
|
||||
},
|
||||
{
|
||||
slug: 'ddfnetwork',
|
||||
name: 'DDF Network',
|
||||
url: 'https://ddfnetwork.com',
|
||||
description: 'European porn videos hub with exclusive VR, 4K and full HD XXX videos and hot sex photos of Europes finest porn star babes.',
|
||||
parent: 'wgcz',
|
||||
},
|
||||
{
|
||||
slug: 'digitalplayground',
|
||||
@@ -272,6 +278,7 @@ const networks = [
|
||||
name: 'LegalPorno',
|
||||
url: 'https://www.legalporno.com',
|
||||
description: 'The Best HD Porn For You!',
|
||||
parent: 'wgcz',
|
||||
},
|
||||
{
|
||||
slug: 'men',
|
||||
@@ -355,6 +362,7 @@ const networks = [
|
||||
name: 'Private',
|
||||
url: 'https://www.private.com',
|
||||
description: 'Private is the best source for adult movies and videos. Featuring the most popular hardcore adult stars in hundreds of porn movies, Private.com delivers...',
|
||||
parent: 'wgcz',
|
||||
},
|
||||
{
|
||||
slug: 'puretaboo',
|
||||
@@ -437,13 +445,13 @@ const networks = [
|
||||
|
||||
exports.seed = knex => Promise.resolve()
|
||||
.then(async () => {
|
||||
const { inserted, updated } = await upsert('entities', parentNetworks.map(network => ({ ...network, type: 1 })), ['slug', 'type'], knex);
|
||||
const { inserted, updated } = await upsert('entities', parentNetworks.map(network => ({ ...network, type: 'network' })), ['slug', 'type'], knex);
|
||||
const parentNetworksBySlug = [].concat(inserted, updated).reduce((acc, network) => ({ ...acc, [network.slug]: network.id }), {});
|
||||
|
||||
const networksWithParent = networks.map(network => ({
|
||||
slug: network.slug,
|
||||
name: network.name,
|
||||
type: network.type || 1,
|
||||
type: network.type || 'network',
|
||||
alias: network.alias ? network.alias.join(',') : null,
|
||||
url: network.url,
|
||||
description: network.description,
|
||||
|
||||
Reference in New Issue
Block a user