2022-07-18 00:42:30 +00:00
|
|
|
const fs = require('fs').promises;
|
|
|
|
const path = require('path');
|
2021-06-27 22:05:24 +00:00
|
|
|
const bulkInsert = require('../src/utils/bulk-insert');
|
|
|
|
|
2021-07-05 22:01:44 +00:00
|
|
|
const affiliates = [
|
|
|
|
{
|
|
|
|
id: 'archangel_share',
|
|
|
|
channel: 'archangel',
|
|
|
|
url: 'https://join.archangelvideo.com/track/MzQ3LjEuMS4xLjAuMC4wLjAuMA',
|
|
|
|
comment: 'revshare',
|
|
|
|
},
|
2021-07-11 23:41:18 +00:00
|
|
|
{
|
|
|
|
id: 'kink_params',
|
|
|
|
network: 'kink',
|
|
|
|
parameters: 't=eyJhZmZpbGlhdGUiOiJEZWJhdWNoZXJ5TGliIiwiY2FtcGFpZ24iOiJkZWZhdWx0IiwiYWdldmVyaWZpZWQiOiJ5In0',
|
|
|
|
comment: '50%',
|
|
|
|
},
|
2023-06-19 03:19:49 +00:00
|
|
|
{
|
|
|
|
id: 'bang_signup',
|
|
|
|
network: 'bang',
|
|
|
|
parameters: 't=eyJhZmZpbGlhdGUiOiJEZWJhdWNoZXJ5TGliIiwiY2FtcGFpZ24iOiJkZWZhdWx0IiwiYWdldmVyaWZpZWQiOiJ5In0',
|
|
|
|
comment: '$25 per signup',
|
|
|
|
},
|
2021-07-05 22:01:44 +00:00
|
|
|
];
|
|
|
|
|
2022-07-18 00:42:30 +00:00
|
|
|
const bannerTags = {
|
|
|
|
// 21sextury
|
|
|
|
'21sextury_300_250_anal': ['anal', 'blonde'],
|
|
|
|
'21sextury_770_76_gina_gerson_dp': ['dp', 'anal', 'mfm', 'blonde'],
|
|
|
|
'21sextury_770_76_veronica_leal_dp': ['dp', 'anal', 'mfm', 'blowjob', 'blonde'],
|
|
|
|
'21sextreme_300_250_cum': ['facial', 'cum-in-mouth'],
|
|
|
|
'21naturals_315_300': ['brunette', 'natural-boobs'],
|
|
|
|
'21naturals_315_300_1': ['blonde', 'natural-boobs'],
|
|
|
|
'21naturals_315_300_gina_gerson': ['sex', 'blonde', 'natural-boobs'],
|
|
|
|
'21naturals_315_300_ginebra_bellucci': ['sex', 'brunette', 'natural-boobs'],
|
|
|
|
'21naturals_315_300_lana_roy_anal': ['anal', 'brunette', 'natural-boobs'],
|
|
|
|
'21naturals_770_76_alexis_crystal': ['blowjob', 'blonde'],
|
|
|
|
'21naturals_970_90': ['sex', 'brunette'],
|
|
|
|
// archangel
|
|
|
|
archangel_970_90_kendra_lust: ['dp', 'anal', 'sex', 'interracial', 'black'],
|
|
|
|
// dogfart
|
|
|
|
wefuckblackgirls_728_90_loss: ['mfm', 'threesome', 'anal', 'black', 'interracial'],
|
|
|
|
// evilangel
|
|
|
|
evilangel_728_90_adriana_chechik_gangbang: ['gangbang', 'airtight', 'dp', 'dvp', 'facial', 'brunette'],
|
|
|
|
evilangel_728_90_kenzie_reeves_lexi_lore: ['anal', 'mff', 'blowjob', 'blonde'],
|
|
|
|
evilangel_970_90_one_dollar: ['sex', 'mff'],
|
|
|
|
// julesjordan
|
|
|
|
julesjordan_728_90_jill_kassidy: ['sex', 'blowjob', 'black-cock', 'brunette'],
|
|
|
|
julesjordan_728_90_angela_white: ['sex', 'black-cock', 'brunette'],
|
|
|
|
julesjordan_728_90_adriana_chechik: ['anal', 'black-cock', 'brunette'],
|
|
|
|
julesjordan_728_90_autumn_falls: ['sex', 'big-boobs', 'brunette'],
|
|
|
|
julesjordan_728_90_gabbie_carter: ['sex', 'blowjob', 'facefucking', 'big-boobs', 'brunette'],
|
|
|
|
manuelferrara_728_90_asses: ['big-butt'],
|
|
|
|
// kink
|
|
|
|
boundgangbangs_305_99_moretta_11975_animated: ['gangbang', 'mfm', 'bdsm', 'blonde'],
|
|
|
|
boundgangbangs_305_99_moretta_11975: ['blowbang', 'blowjob', 'bdsm', 'blonde'],
|
|
|
|
boundgangbangs_315_300_lou_charmelle_12402_animated: ['gangbang', 'airtight', 'dp', 'bdsm', 'bondage'],
|
|
|
|
boundgangbangs_315_300_lou_charmelle_12402: ['gangbang', 'mfm', 'bdsm', 'bondage'],
|
|
|
|
boundgangbangs_770_76_amy_brooke_11965_animated: ['gangbang', 'airtight', 'mfm', 'bdsm', 'bondage'],
|
|
|
|
boundgangbangs_770_76_anissa_kate_19662: ['gangbang', 'airtight', 'bdsm', 'bondage'],
|
|
|
|
boundgangbangs_970_90_sasha_swift_18815: ['gangbang', 'blowbang', 'dp', 'blowjob', 'facefucking', 'facial', 'bdsm'],
|
|
|
|
boundgangbangs_970_90_skylar_price_12403_animated: ['gangbang', 'mfm', 'blowbang', 'blowjob', 'blonde', 'bdsm'],
|
|
|
|
hardcoregangbang_300_250_kira_noir_44157: ['blowbang', 'black', 'bdsm'],
|
|
|
|
hardcoregangbang_305_99_kira_noir: ['blowbang', 'black', 'bdsm'],
|
|
|
|
hardcoregangbang_900_250_gloves_blonde: ['blowbang', 'blonde', 'bdsm'],
|
|
|
|
hardcoregangbang_1000_100: ['gangbang', 'mfm', 'bdsm'],
|
|
|
|
// teenmegaworld
|
|
|
|
analangels_468_80_animated: ['anal'],
|
|
|
|
analangels_300_250_animated: ['anal'],
|
|
|
|
analbeauty_468_80_animated: ['anal'],
|
|
|
|
analbeauty_300_250_animated: ['anal'],
|
|
|
|
analbeauty_300_250_tail_animated: ['anal', 'bondage', 'bdsm'],
|
|
|
|
beautyangels_468_80_animated: ['solo'],
|
|
|
|
beautyangels_300_250_69_animated: ['lesbian', '69'],
|
|
|
|
beautyangels_300_250_lesbian_animated: ['lesbian'],
|
|
|
|
teenmegaworld_300_250_animated: ['solo'],
|
|
|
|
tmwvrnet_468_80_animated: ['vr'],
|
|
|
|
// legalporno/analvids/pornworld
|
|
|
|
pornworld_600_120_1: ['anal', 'brunette'],
|
|
|
|
pornworld_600_120_2: ['mfm', 'sex', 'brunette'],
|
|
|
|
// xempire
|
|
|
|
hardx_770_76_anal: ['anal', 'blonde'],
|
|
|
|
hardx_770_76_esperanza_anal: ['anal', 'brunette'],
|
|
|
|
hardx_770_76_zoey_monroe_mff: ['sex', 'mff', 'blonde'],
|
|
|
|
xempire_315_300: ['blowbang', 'sex', 'black-cock', 'brunette'],
|
|
|
|
xempire_970_90_mff: ['mff', '69', 'brunette'],
|
|
|
|
// vixen
|
|
|
|
blacked_300_250_cherry_kiss_dp: ['dp', 'anal', 'black-cock'],
|
|
|
|
blacked_300_250_cherry_kiss_anal_mfm: ['anal', 'black-cock'],
|
|
|
|
tushy_970_70_alexa_flexy_dp: ['dp', 'anal'],
|
|
|
|
tushy_776_70_gianna_dior_anal: ['anal'],
|
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
const bannerActors = {
|
|
|
|
// 21sextury
|
|
|
|
'21sextury_770_76_gina_gerson_dp': ['gina-gerson'],
|
|
|
|
'21sextury_770_76_veronica_leal_dp': ['veronica-leal'],
|
|
|
|
'21naturals_315_300_gina_gerson': ['gina-gerson'],
|
|
|
|
'21naturals_315_300_ginebra_bellucci': ['ginebra-bellucci'],
|
|
|
|
'21naturals_315_300_lana_roy_anal': ['lana-roy'],
|
|
|
|
'21naturals_770_76_alexis_crystal': ['alexis-crystal'],
|
|
|
|
// archangel
|
|
|
|
archangel_970_90_kendra_lust: ['kendra-lust'],
|
|
|
|
// evilangel
|
|
|
|
evilangel_728_90_adriana_chechik_gangbang: ['adriana-chechik'],
|
|
|
|
evilangel_728_90_kenzie_reeves_lexi_lore: ['kenzie-reeves', 'lexi-lore'],
|
|
|
|
// julesjordan
|
|
|
|
julesjordan_728_90_jill_kassidy: ['jill-kassidy'],
|
|
|
|
julesjordan_728_90_angela_white: ['angela-white'],
|
|
|
|
julesjordan_728_90_adriana_chechik: ['adriana-chechik'],
|
|
|
|
julesjordan_728_90_autumn_falls: ['autumn-falls'],
|
|
|
|
julesjordan_728_90_gabbie_carter: ['gabbie-carter'],
|
|
|
|
// kink
|
|
|
|
boundgangbangs_305_99_moretta_11975_animated: ['moretta'],
|
|
|
|
boundgangbangs_305_99_moretta_11975: ['moretta'],
|
|
|
|
boundgangbangs_315_300_lou_charmelle_12402_animated: ['lou-charmelle'],
|
|
|
|
boundgangbangs_315_300_lou_charmelle_12402: ['lou-charmelle'],
|
|
|
|
boundgangbangs_770_76_amy_brooke_11965_animated: ['amy-brooke'],
|
|
|
|
boundgangbangs_770_76_anissa_kate_19662: ['anissa-kate'],
|
|
|
|
boundgangbangs_970_90_sasha_swift_18815: ['sasha-swift'],
|
|
|
|
boundgangbangs_970_90_skylar_price_12403_animated: ['skylar-price'],
|
|
|
|
hardcoregangbang_300_250_kira_noir_44157: ['kira-noir'],
|
|
|
|
hardcoregangbang_305_99_kira_noir: ['kira-noir'],
|
|
|
|
// xempire
|
|
|
|
hardx_770_76_esperanza_anal: ['esperanza-del-horno'],
|
|
|
|
hardx_770_76_zoey_monroe_mff: ['zoey-monroe'],
|
|
|
|
// vixen
|
|
|
|
blacked_300_250_cherry_kiss_dp: ['cherry-kiss'],
|
|
|
|
blacked_300_250_cherry_kiss_anal_mfm: ['cherry-kiss'],
|
|
|
|
tushy_970_70_alexa_flexy_dp: ['alexa-flexy'],
|
|
|
|
tushy_776_70_gianna_dior_anal: ['gianna-dior'],
|
|
|
|
};
|
|
|
|
*/
|
2021-06-27 22:05:24 +00:00
|
|
|
|
2021-06-28 00:50:06 +00:00
|
|
|
const campaigns = [
|
2022-07-18 00:42:30 +00:00
|
|
|
// 21sextury
|
2021-06-28 03:13:41 +00:00
|
|
|
{
|
|
|
|
network: '21sextury',
|
|
|
|
url: 'https://www.iyalc.com/21sextury/go.php?pr=8&su=1&si=207&ad=277470&pa=index&ar=&buffer=',
|
|
|
|
comment: 'per signup',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
banner: '21sextury_300_250_anal',
|
2022-07-18 00:42:30 +00:00
|
|
|
network: '21sextury',
|
2021-06-28 03:13:41 +00:00
|
|
|
url: 'https://www.iyalc.com/21sextury/go.php?pr=8&su=1&si=207&ad=277470&pa=index&ar=&buffer=',
|
|
|
|
comment: 'per signup',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
banner: '21sextury_770_76_gina_gerson_dp',
|
2022-07-18 00:42:30 +00:00
|
|
|
network: '21sextury',
|
2021-06-28 03:13:41 +00:00
|
|
|
url: 'https://www.iyalc.com/21sextury/go.php?pr=8&su=1&si=207&ad=277470&pa=index&ar=&buffer=',
|
|
|
|
comment: 'per signup',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
banner: '21sextury_770_76_veronica_leal_dp',
|
2022-07-18 00:42:30 +00:00
|
|
|
network: '21sextury',
|
2021-06-28 03:13:41 +00:00
|
|
|
url: 'https://www.iyalc.com/21sextury/go.php?pr=8&su=1&si=207&ad=277470&pa=index&ar=&buffer=',
|
|
|
|
comment: 'per signup',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
banner: '21sextreme_300_250_cum',
|
2022-07-18 00:42:30 +00:00
|
|
|
network: '21sextreme',
|
2021-06-28 03:13:41 +00:00
|
|
|
url: 'https://www.iyalc.com/21sextreme/go.php?pr=8&su=1&si=208&ad=277470&pa=index&ar=&buffer=',
|
|
|
|
comment: 'per signup',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
banner: '21naturals_315_300',
|
2022-07-18 00:42:30 +00:00
|
|
|
network: '21naturals',
|
2021-06-28 03:13:41 +00:00
|
|
|
url: 'https://www.iyalc.com/21naturals/go.php?pr=8&su=1&si=209&ad=277470&pa=index&ar=&buffer=',
|
|
|
|
comment: 'per signup',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
banner: '21naturals_315_300_1',
|
2022-07-18 00:42:30 +00:00
|
|
|
network: '21naturals',
|
2021-06-28 03:13:41 +00:00
|
|
|
url: 'https://www.iyalc.com/21naturals/go.php?pr=8&su=1&si=209&ad=277470&pa=index&ar=&buffer=',
|
|
|
|
comment: 'per signup',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
banner: '21naturals_315_300_gina_gerson',
|
2022-07-18 00:42:30 +00:00
|
|
|
network: '21naturals',
|
2021-06-28 03:13:41 +00:00
|
|
|
url: 'https://www.iyalc.com/21naturals/go.php?pr=8&su=1&si=209&ad=277470&pa=index&ar=&buffer=',
|
|
|
|
comment: 'per signup',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
banner: '21naturals_315_300_ginebra_bellucci',
|
2022-07-18 00:42:30 +00:00
|
|
|
network: '21naturals',
|
2021-06-28 03:13:41 +00:00
|
|
|
url: 'https://www.iyalc.com/21naturals/go.php?pr=8&su=1&si=209&ad=277470&pa=index&ar=&buffer=',
|
|
|
|
comment: 'per signup',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
banner: '21naturals_315_300_lana_roy_anal',
|
2022-07-18 00:42:30 +00:00
|
|
|
network: '21naturals',
|
2021-06-28 03:13:41 +00:00
|
|
|
url: 'https://www.iyalc.com/21naturals/go.php?pr=8&su=1&si=209&ad=277470&pa=index&ar=&buffer=',
|
|
|
|
comment: 'per signup',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
banner: '21naturals_770_76_alexis_crystal',
|
2022-07-18 00:42:30 +00:00
|
|
|
network: '21naturals',
|
2021-06-28 03:13:41 +00:00
|
|
|
url: 'https://www.iyalc.com/21naturals/go.php?pr=8&su=1&si=209&ad=277470&pa=index&ar=&buffer=',
|
|
|
|
comment: 'per signup',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
banner: '21naturals_970_90',
|
2022-07-18 00:42:30 +00:00
|
|
|
network: '21naturals',
|
2021-06-28 03:13:41 +00:00
|
|
|
url: 'https://www.iyalc.com/21naturals/go.php?pr=8&su=1&si=209&ad=277470&pa=index&ar=&buffer=',
|
|
|
|
comment: 'per signup',
|
|
|
|
},
|
2022-07-18 00:42:30 +00:00
|
|
|
// archangel
|
2021-07-05 22:01:44 +00:00
|
|
|
{
|
|
|
|
channel: 'archangel',
|
|
|
|
affiliate: 'archangel_share',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
channel: 'archangel',
|
|
|
|
affiliate: 'archangel_share',
|
|
|
|
banner: 'archangel_970_90_kendra_lust',
|
|
|
|
},
|
2021-06-28 16:45:38 +00:00
|
|
|
{
|
|
|
|
network: 'brazzers',
|
|
|
|
url: 'https://landing.brazzersnetwork.com/?ats=eyJhIjozMTYwOTcsImMiOjU5MzI1Mzk5LCJuIjoxNCwicyI6OTAsImUiOjg4MDMsInAiOjExfQ==',
|
|
|
|
comment: '$30 per signup',
|
|
|
|
},
|
2021-06-28 00:50:06 +00:00
|
|
|
{
|
|
|
|
network: 'evilangel',
|
|
|
|
url: 'https://www.iyalc.com/evilangel/go.php?pr=8&su=2&si=128&ad=277470&pa=index&ar=&buffer=',
|
|
|
|
comment: 'per signup',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
banner: 'evilangel_728_90_adriana_chechik_gangbang',
|
2022-07-18 00:42:30 +00:00
|
|
|
network: 'evilangel',
|
2021-06-28 00:50:06 +00:00
|
|
|
url: 'https://www.iyalc.com/evilangel/go.php?pr=8&su=2&si=128&ad=277470&pa=index&ar=&buffer=',
|
|
|
|
comment: 'per signup',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
banner: 'evilangel_728_90_kenzie_reeves_lexi_lore',
|
2022-07-18 00:42:30 +00:00
|
|
|
network: 'evilangel',
|
2021-06-28 00:50:06 +00:00
|
|
|
url: 'https://www.iyalc.com/evilangel/go.php?pr=8&su=2&si=128&ad=277470&pa=index&ar=&buffer=',
|
|
|
|
comment: 'per signup',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
banner: 'evilangel_970_90_one_dollar',
|
2022-07-18 00:42:30 +00:00
|
|
|
network: 'evilangel',
|
2021-06-28 00:50:06 +00:00
|
|
|
url: 'https://www.iyalc.com/evilangel/go.php?pr=8&su=2&si=128&ad=277470&pa=index&ar=&buffer=',
|
|
|
|
comment: 'per signup',
|
|
|
|
},
|
2023-06-19 03:11:27 +00:00
|
|
|
// bang
|
|
|
|
{
|
|
|
|
network: 'bang',
|
2023-06-19 03:19:49 +00:00
|
|
|
affiliate: 'bang_signup',
|
2023-06-19 03:11:27 +00:00
|
|
|
comment: 'per signup',
|
|
|
|
},
|
2022-07-18 00:42:30 +00:00
|
|
|
// julesjordan
|
2021-06-28 00:50:06 +00:00
|
|
|
{
|
2022-07-18 00:42:30 +00:00
|
|
|
network: 'julesjordan',
|
|
|
|
url: 'https://enter.julesjordan.com/track/Mzk3MS4yLjMuNi4wLjAuMC4wLjA',
|
2021-06-28 00:50:06 +00:00
|
|
|
comment: '$30 per signup',
|
|
|
|
},
|
|
|
|
{
|
2022-07-18 00:42:30 +00:00
|
|
|
banner: 'julesjordan_728_90_jill_kassidy',
|
|
|
|
network: 'julesjordan',
|
|
|
|
url: 'https://enter.julesjordan.com/track/Mzk3MS4yLjMuNi4wLjAuMC4wLjA',
|
2021-06-28 00:50:06 +00:00
|
|
|
comment: '$30 per signup',
|
|
|
|
},
|
|
|
|
{
|
2022-07-18 00:42:30 +00:00
|
|
|
banner: 'julesjordan_728_90_angela_white',
|
|
|
|
network: 'julesjordan',
|
|
|
|
url: 'https://enter.julesjordan.com/track/Mzk3MS4yLjMuNi4wLjAuMC4wLjA',
|
2021-06-28 00:50:06 +00:00
|
|
|
comment: '$30 per signup',
|
|
|
|
},
|
|
|
|
{
|
2022-07-18 00:42:30 +00:00
|
|
|
banner: 'julesjordan_728_90_adriana_chechik',
|
|
|
|
network: 'julesjordan',
|
|
|
|
url: 'https://enter.julesjordan.com/track/Mzk3MS4yLjMuNi4wLjAuMC4wLjA',
|
2021-06-28 00:50:06 +00:00
|
|
|
comment: '$30 per signup',
|
|
|
|
},
|
2021-06-27 22:05:24 +00:00
|
|
|
{
|
2022-07-18 00:42:30 +00:00
|
|
|
banner: 'julesjordan_728_90_autumn_falls',
|
2021-06-27 22:05:24 +00:00
|
|
|
network: 'julesjordan',
|
2021-06-28 00:50:06 +00:00
|
|
|
url: 'https://enter.julesjordan.com/track/Mzk3MS4yLjMuNi4wLjAuMC4wLjA',
|
|
|
|
comment: '$30 per signup',
|
2021-06-27 22:05:24 +00:00
|
|
|
},
|
|
|
|
{
|
2022-07-18 00:42:30 +00:00
|
|
|
banner: 'julesjordan_728_90_gabbie_carter',
|
2021-06-27 22:05:24 +00:00
|
|
|
network: 'julesjordan',
|
2021-06-28 00:50:06 +00:00
|
|
|
url: 'https://enter.julesjordan.com/track/Mzk3MS4yLjMuNi4wLjAuMC4wLjA',
|
|
|
|
comment: '$30 per signup',
|
2021-06-27 22:05:24 +00:00
|
|
|
},
|
|
|
|
{
|
2022-07-18 00:42:30 +00:00
|
|
|
channel: 'manuelferrara',
|
|
|
|
url: 'https://enter.manuelferrara.com/track/Mzk3MS4yLjcuMTYuMC4wLjAuMC4w',
|
2021-06-28 00:50:06 +00:00
|
|
|
comment: '$30 per signup',
|
2021-06-27 22:05:24 +00:00
|
|
|
},
|
|
|
|
{
|
2022-07-18 00:42:30 +00:00
|
|
|
banner: 'manuelferrara_728_90_asses',
|
|
|
|
channel: 'manuelferrara',
|
|
|
|
url: 'https://enter.manuelferrara.com/track/Mzk3MS4yLjcuMTYuMC4wLjAuMC4w',
|
2021-06-28 00:50:06 +00:00
|
|
|
comment: '$30 per signup',
|
2021-06-27 22:05:24 +00:00
|
|
|
},
|
|
|
|
{
|
2022-07-18 00:42:30 +00:00
|
|
|
channel: 'theassfactory',
|
|
|
|
url: 'https://enter.theassfactory.com/track/Mzk3MS4yLjEuMS4wLjAuMC4wLjA',
|
2021-06-28 00:50:06 +00:00
|
|
|
comment: '$30 per signup',
|
2021-06-27 22:05:24 +00:00
|
|
|
},
|
|
|
|
{
|
2022-07-18 00:42:30 +00:00
|
|
|
channel: 'spermswallowers',
|
|
|
|
url: 'https://enter.spermswallowers.com/track/Mzk3MS4yLjUuMTMuMC4wLjAuMC4w',
|
2021-06-28 00:50:06 +00:00
|
|
|
comment: '$30 per signup',
|
2021-06-27 22:05:24 +00:00
|
|
|
},
|
2022-07-18 00:42:30 +00:00
|
|
|
// kink
|
2021-07-04 22:06:18 +00:00
|
|
|
{
|
|
|
|
network: 'kink',
|
2021-07-11 23:41:18 +00:00
|
|
|
affiliate: 'kink_params',
|
2021-07-04 22:06:18 +00:00
|
|
|
comment: '50%',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
channel: 'boundgangbangs',
|
2022-07-18 00:42:30 +00:00
|
|
|
url: 'https://www.kink.com/channel/bound-gang-bangs?t=eyJhZmZpbGlhdGUiOiJEZWJhdWNoZXJ5TGliIiwiY2FtcGFpZ24iOiJkZWZhdWx0IiwiYWdldmVyaWZpZWQiOiJ5In0',
|
2021-07-04 22:06:18 +00:00
|
|
|
comment: '50%',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
channel: 'hardcoregangbang',
|
2022-07-18 00:42:30 +00:00
|
|
|
url: 'https://www.kink.com/channel/hardcore-gangbang?t=eyJhZmZpbGlhdGUiOiJEZWJhdWNoZXJ5TGliIiwiY2FtcGFpZ24iOiJkZWZhdWx0IiwiYWdldmVyaWZpZWQiOiJ5In0',
|
2021-07-04 22:06:18 +00:00
|
|
|
comment: '50%',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
banner: 'boundgangbangs_305_99_moretta_11975',
|
|
|
|
url: 'https://www.kink.com/channel/bound-gang-bangs?t=eyJhZmZpbGlhdGUiOiJEZWJhdWNoZXJ5TGliIiwiY2FtcGFpZ24iOiJkZWZhdWx0IiwiYWdldmVyaWZpZWQiOiJ5In0',
|
|
|
|
channel: 'boundgangbangs',
|
|
|
|
comment: '50%',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
banner: 'boundgangbangs_305_99_moretta_11975_animated',
|
|
|
|
url: 'https://www.kink.com/channel/bound-gang-bangs?t=eyJhZmZpbGlhdGUiOiJEZWJhdWNoZXJ5TGliIiwiY2FtcGFpZ24iOiJkZWZhdWx0IiwiYWdldmVyaWZpZWQiOiJ5In0',
|
|
|
|
channel: 'boundgangbangs',
|
|
|
|
comment: '50%',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
banner: 'boundgangbangs_315_300_lou_charmelle_12402',
|
|
|
|
url: 'https://www.kink.com/channel/bound-gang-bangs?t=eyJhZmZpbGlhdGUiOiJEZWJhdWNoZXJ5TGliIiwiY2FtcGFpZ24iOiJkZWZhdWx0IiwiYWdldmVyaWZpZWQiOiJ5In0',
|
|
|
|
channel: 'boundgangbangs',
|
|
|
|
comment: '50%',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
banner: 'boundgangbangs_315_300_lou_charmelle_12402_animated',
|
|
|
|
url: 'https://www.kink.com/channel/bound-gang-bangs?t=eyJhZmZpbGlhdGUiOiJEZWJhdWNoZXJ5TGliIiwiY2FtcGFpZ24iOiJkZWZhdWx0IiwiYWdldmVyaWZpZWQiOiJ5In0',
|
|
|
|
channel: 'boundgangbangs',
|
|
|
|
comment: '50%',
|
|
|
|
},
|
|
|
|
{
|
2022-07-18 00:42:30 +00:00
|
|
|
banner: 'boundgangbangs_770_76_amy_brooke_11965_animated',
|
2021-07-04 22:06:18 +00:00
|
|
|
url: 'https://www.kink.com/channel/bound-gang-bangs?t=eyJhZmZpbGlhdGUiOiJEZWJhdWNoZXJ5TGliIiwiY2FtcGFpZ24iOiJkZWZhdWx0IiwiYWdldmVyaWZpZWQiOiJ5In0',
|
|
|
|
channel: 'boundgangbangs',
|
|
|
|
comment: '50%',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
banner: 'boundgangbangs_770_76_anissa_kate_19662',
|
|
|
|
url: 'https://www.kink.com/channel/bound-gang-bangs?t=eyJhZmZpbGlhdGUiOiJEZWJhdWNoZXJ5TGliIiwiY2FtcGFpZ24iOiJkZWZhdWx0IiwiYWdldmVyaWZpZWQiOiJ5In0',
|
|
|
|
channel: 'boundgangbangs',
|
|
|
|
comment: '50%',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
banner: 'boundgangbangs_970_90_sasha_swift_18815',
|
|
|
|
url: 'https://www.kink.com/channel/bound-gang-bangs?t=eyJhZmZpbGlhdGUiOiJEZWJhdWNoZXJ5TGliIiwiY2FtcGFpZ24iOiJkZWZhdWx0IiwiYWdldmVyaWZpZWQiOiJ5In0',
|
|
|
|
channel: 'boundgangbangs',
|
|
|
|
comment: '50%',
|
|
|
|
},
|
|
|
|
{
|
2022-07-18 00:42:30 +00:00
|
|
|
banner: 'boundgangbangs_970_90_skylar_price_12403_animated',
|
2021-07-04 22:06:18 +00:00
|
|
|
url: 'https://www.kink.com/channel/bound-gang-bangs?t=eyJhZmZpbGlhdGUiOiJEZWJhdWNoZXJ5TGliIiwiY2FtcGFpZ24iOiJkZWZhdWx0IiwiYWdldmVyaWZpZWQiOiJ5In0',
|
|
|
|
channel: 'boundgangbangs',
|
|
|
|
comment: '50%',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
banner: 'hardcoregangbang_300_250_kira_noir_44157',
|
|
|
|
url: 'https://www.kink.com/channel/hardcore-gangbang?t=eyJhZmZpbGlhdGUiOiJEZWJhdWNoZXJ5TGliIiwiY2FtcGFpZ24iOiJkZWZhdWx0IiwiYWdldmVyaWZpZWQiOiJ5In0',
|
|
|
|
channel: 'hardcoregangbang',
|
|
|
|
comment: '50%',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
banner: 'hardcoregangbang_305_99_kira_noir',
|
|
|
|
url: 'https://www.kink.com/channel/hardcore-gangbang?t=eyJhZmZpbGlhdGUiOiJEZWJhdWNoZXJ5TGliIiwiY2FtcGFpZ24iOiJkZWZhdWx0IiwiYWdldmVyaWZpZWQiOiJ5In0',
|
|
|
|
channel: 'hardcoregangbang',
|
|
|
|
comment: '50%',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
banner: 'hardcoregangbang_900_250_gloves_blonde',
|
|
|
|
url: 'https://www.kink.com/channel/hardcore-gangbang?t=eyJhZmZpbGlhdGUiOiJEZWJhdWNoZXJ5TGliIiwiY2FtcGFpZ24iOiJkZWZhdWx0IiwiYWdldmVyaWZpZWQiOiJ5In0',
|
|
|
|
channel: 'hardcoregangbang',
|
|
|
|
comment: '50%',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
banner: 'hardcoregangbang_1000_100',
|
|
|
|
url: 'https://www.kink.com/channel/hardcore-gangbang?t=eyJhZmZpbGlhdGUiOiJEZWJhdWNoZXJ5TGliIiwiY2FtcGFpZ24iOiJkZWZhdWx0IiwiYWdldmVyaWZpZWQiOiJ5In0',
|
|
|
|
channel: 'hardcoregangbang',
|
|
|
|
comment: '50%',
|
|
|
|
},
|
2022-07-18 00:42:30 +00:00
|
|
|
// kellymadison/teenfidelity
|
2021-07-04 22:06:18 +00:00
|
|
|
{
|
|
|
|
network: 'kellymadison',
|
|
|
|
url: 'https://www2.kellymadison.com/track/MTAxOTE0LjYuMS4xLjAuMC4wLjAuMA',
|
|
|
|
comment: '$25 per signup',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
channel: 'kellymadison',
|
|
|
|
url: 'https://www2.kellymadison.com/track/MTAxOTE0LjYuMS4xLjAuMC4wLjAuMA',
|
|
|
|
comment: '$25 per signup',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
channel: 'pornfidelity',
|
|
|
|
url: 'https://www2.pornfidelity.com/track/MTAxOTE0LjYuMy4zLjAuMC4wLjAuMA',
|
|
|
|
comment: '$25 per signup',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
channel: 'teenfidelity',
|
|
|
|
url: 'https://www2.teenfidelity.com/track/MTAxOTE0LjYuNS42LjAuMC4wLjAuMA',
|
|
|
|
comment: '$25 per signup',
|
|
|
|
},
|
2022-07-18 00:42:30 +00:00
|
|
|
// teenmegaworld
|
2021-09-17 02:28:48 +00:00
|
|
|
{
|
|
|
|
network: 'teenmegaworld',
|
|
|
|
url: 'https://secure.teenmegaworld.net/track/MzAxNjcxLjUuMS4xLjAuMC4wLjAuMA',
|
|
|
|
comment: 'recurring',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
banner: 'teenmegaworld_300_250_animated',
|
|
|
|
network: 'teenmegaworld',
|
|
|
|
url: 'https://secure.teenmegaworld.net/track/MzAxNjcxLjUuMS4xLjAuMC4wLjAuMA',
|
|
|
|
comment: 'recurring',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
banner: 'analangels_468_80_animated',
|
|
|
|
channel: 'analangels',
|
|
|
|
url: 'https://secure.anal-angels.com/track/MzAxNjcxLjUuMzMuMzMuMC4wLjAuMC4w',
|
|
|
|
comment: 'recurring',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
banner: 'analangels_300_250_animated',
|
|
|
|
channel: 'analangels',
|
|
|
|
url: 'https://secure.anal-angels.com/track/MzAxNjcxLjUuMzMuMzMuMC4wLjAuMC4w',
|
|
|
|
comment: 'recurring',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
banner: 'analbeauty_468_80_animated',
|
|
|
|
channel: 'analbeauty',
|
|
|
|
url: 'https://secure.anal-beauty.com/track/MzAxNjcxLjUuNDAuNDAuMC4wLjAuMC4w',
|
|
|
|
comment: 'recurring',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
banner: 'analbeauty_300_250_animated',
|
|
|
|
channel: 'analbeauty',
|
|
|
|
url: 'https://secure.anal-beauty.com/track/MzAxNjcxLjUuNDAuNDAuMC4wLjAuMC4w',
|
|
|
|
comment: 'recurring',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
banner: 'analbeauty_300_250_tail_animated',
|
|
|
|
channel: 'analbeauty',
|
|
|
|
url: 'https://secure.anal-beauty.com/track/MzAxNjcxLjUuNDAuNDAuMC4wLjAuMC4w',
|
|
|
|
comment: 'recurring',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
banner: 'beautyangels_468_80_animated',
|
|
|
|
channel: 'beautyangels',
|
|
|
|
url: 'https://secure.beauty-angels.com/track/MzAxNjcxLjUuMjcuMjcuMC4wLjAuMC4w',
|
|
|
|
comment: 'recurring',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
banner: 'beautyangels_300_250_69_animated',
|
|
|
|
channel: 'beautyangels',
|
|
|
|
url: 'https://secure.beauty-angels.com/track/MzAxNjcxLjUuMjcuMjcuMC4wLjAuMC4w',
|
|
|
|
comment: 'recurring',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
banner: 'beautyangels_300_250_lesbian_animated',
|
|
|
|
channel: 'beautyangels',
|
|
|
|
url: 'https://secure.beauty-angels.com/track/MzAxNjcxLjUuMjcuMjcuMC4wLjAuMC4w',
|
|
|
|
comment: 'recurring',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
banner: 'tmwvrnet_468_80_animated',
|
|
|
|
channel: 'tmwvrnet',
|
|
|
|
url: 'https://secure.tmwvrnet.com/track/MzAxNjcxLjUuNDQuNDQuMC4wLjAuMC4w',
|
|
|
|
comment: 'recurring',
|
|
|
|
},
|
2022-07-18 00:42:30 +00:00
|
|
|
// legalporno/analvids/pornworld
|
2021-06-27 22:05:24 +00:00
|
|
|
{
|
2022-02-24 22:30:47 +00:00
|
|
|
network: 'analvids',
|
|
|
|
url: 'https://www.analvids.com/new-videos?aff=BW90MHT1DP____',
|
2021-06-28 00:50:06 +00:00
|
|
|
comment: 'default offer',
|
2021-06-27 22:05:24 +00:00
|
|
|
},
|
|
|
|
{
|
2022-02-24 22:30:47 +00:00
|
|
|
channel: 'analvids',
|
2021-06-27 22:05:24 +00:00
|
|
|
banner: 'pornworld_600_120_1',
|
2022-02-24 22:30:47 +00:00
|
|
|
url: 'https://www.analvids.com/new-videos?aff=BW90MHT1DP____',
|
2021-06-28 00:50:06 +00:00
|
|
|
comment: 'default offer',
|
2021-06-27 22:05:24 +00:00
|
|
|
},
|
|
|
|
{
|
2022-02-24 22:30:47 +00:00
|
|
|
channel: 'analvids',
|
2021-06-27 22:05:24 +00:00
|
|
|
banner: 'pornworld_600_120_2',
|
2022-02-24 22:30:47 +00:00
|
|
|
url: 'https://www.analvids.com/new-videos?aff=BW90MHT1DP____',
|
2021-06-28 00:50:06 +00:00
|
|
|
comment: 'default offer',
|
2021-06-27 22:05:24 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
network: 'pornworld',
|
2021-06-28 00:50:06 +00:00
|
|
|
url: 'https://pornworld.com/new-videos?aff=BW90MHT1DP____',
|
|
|
|
comment: 'default offer',
|
2021-06-27 22:05:24 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
network: 'pornworld',
|
|
|
|
banner: 'pornworld_600_120_1',
|
2021-06-28 00:50:06 +00:00
|
|
|
url: 'https://pornworld.com/new-videos?aff=BW90MHT1DP____',
|
|
|
|
comment: 'default offer',
|
2021-06-27 22:05:24 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
network: 'pornworld',
|
|
|
|
banner: 'pornworld_600_120_2',
|
2021-06-28 00:50:06 +00:00
|
|
|
url: 'https://pornworld.com/new-videos?aff=BW90MHT1DP____',
|
|
|
|
comment: 'default offer',
|
|
|
|
},
|
2022-07-18 00:42:30 +00:00
|
|
|
// xempire
|
2021-06-28 00:50:06 +00:00
|
|
|
{
|
|
|
|
network: 'xempire',
|
|
|
|
url: 'https://www.blazinglink.com/xempire/go.php?pr=12&su=2&si=81&pa=index&ar=&ad=277470',
|
|
|
|
comment: '$30 per signup',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
network: 'xempire',
|
|
|
|
banner: 'xempire_970_90_mff',
|
|
|
|
url: 'https://www.blazinglink.com/xempire/go.php?pr=12&su=2&si=81&pa=index&ar=&ad=277470',
|
|
|
|
comment: '$30 per signup',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
network: 'xempire',
|
|
|
|
banner: 'xempire_315_300',
|
|
|
|
url: 'https://www.blazinglink.com/xempire/go.php?pr=12&su=2&si=81&pa=index&ar=&ad=277470',
|
|
|
|
comment: '$30 per signup',
|
2021-06-27 22:05:24 +00:00
|
|
|
},
|
2022-07-18 00:42:30 +00:00
|
|
|
{
|
|
|
|
channel: 'hardx',
|
|
|
|
url: 'https://www.blazinglink.com/hardx/go.php?pr=12&su=2&si=68&pa=index&ar=&ad=277470',
|
|
|
|
comment: '$30 per signup',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
channel: 'hardx',
|
|
|
|
banner: 'hardx_770_76_anal',
|
|
|
|
url: 'https://www.blazinglink.com/hardx/go.php?pr=12&su=2&si=68&pa=index&ar=&ad=277470',
|
|
|
|
comment: '$30 per signup',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
channel: 'hardx',
|
|
|
|
banner: 'hardx_770_76_esperanza_anal',
|
|
|
|
url: 'https://www.blazinglink.com/hardx/go.php?pr=12&su=2&si=68&pa=index&ar=&ad=277470',
|
|
|
|
comment: '$30 per signup',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
channel: 'hardx',
|
|
|
|
banner: 'hardx_770_76_zoey_monroe_mff',
|
|
|
|
url: 'https://www.blazinglink.com/hardx/go.php?pr=12&su=2&si=68&pa=index&ar=&ad=277470',
|
|
|
|
comment: '$30 per signup',
|
|
|
|
},
|
|
|
|
// vixen
|
|
|
|
{
|
|
|
|
channel: 'blacked',
|
|
|
|
url: 'https://join.blacked.com/track/MTA0MS43OC4zLjMuMC4wLjAuMC4w',
|
|
|
|
comment: '$30 per signup',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
channel: 'blacked',
|
|
|
|
banner: 'blacked_300_250_cherry_kiss_dp',
|
|
|
|
url: 'https://join.blacked.com/track/MTA0MS43OC4zLjMuMC4wLjAuMC4w',
|
|
|
|
comment: '$30 per signup',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
channel: 'blacked',
|
|
|
|
banner: 'blacked_300_250_cherry_kiss_anal_mfm',
|
|
|
|
url: 'https://join.blacked.com/track/MTA0MS43OC4zLjMuMC4wLjAuMC4w',
|
|
|
|
comment: '$30 per signup',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
channel: 'tushy',
|
|
|
|
url: 'https://join.tushy.com/track/MTA0MS43OC43LjIwLjAuMC4wLjAuMA',
|
|
|
|
comment: '$30 per signup',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
channel: 'tushy',
|
|
|
|
banner: 'tushy_970_70_alexa_flexy_dp',
|
|
|
|
url: 'https://join.tushy.com/track/MTA0MS43OC43LjIwLjAuMC4wLjAuMA',
|
|
|
|
comment: '$30 per signup',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
channel: 'tushy',
|
|
|
|
banner: 'tushy_776_70_gianna_dior_anal',
|
|
|
|
url: 'https://join.tushy.com/track/MTA0MS43OC43LjIwLjAuMC4wLjAuMA',
|
|
|
|
comment: '$30 per signup',
|
|
|
|
},
|
2021-06-27 22:05:24 +00:00
|
|
|
];
|
|
|
|
|
2022-04-04 16:21:51 +00:00
|
|
|
exports.seed = async (knex) => Promise.resolve()
|
2021-06-27 22:05:24 +00:00
|
|
|
.then(async () => {
|
2022-07-18 00:42:30 +00:00
|
|
|
const bannerNetworks = await fs.readdir('./public/img/banners');
|
|
|
|
|
|
|
|
// derive entity, width and height from filepath to minimize redundant work
|
|
|
|
const rawBanners = await Promise.all(bannerNetworks.map(async (network) => {
|
|
|
|
const networkPaths = await fs.readdir(`./public/img/banners/${network}`);
|
|
|
|
|
|
|
|
return Promise.all(networkPaths.map(async (file) => {
|
|
|
|
if (file.charAt(0) === '_') {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (await fs.stat(`./public/img/banners/${network}/${file}`).then(async (stats) => stats.isDirectory())) {
|
|
|
|
const channelPaths = await fs.readdir(`./public/img/banners/${network}/${file}`);
|
|
|
|
|
|
|
|
return channelPaths.map((filepath) => ({
|
|
|
|
id: path.parse(filepath).name,
|
|
|
|
channel: file,
|
|
|
|
}));
|
|
|
|
}
|
|
|
|
|
|
|
|
return {
|
|
|
|
id: path.parse(file).name,
|
|
|
|
network,
|
|
|
|
};
|
|
|
|
}));
|
|
|
|
}));
|
|
|
|
|
|
|
|
const banners = rawBanners
|
|
|
|
.flat(2)
|
|
|
|
.filter(Boolean)
|
|
|
|
.map((banner) => {
|
|
|
|
const [, width, height] = banner.id.match(/[a-z0-9]+_(\d+)_(\d+)/);
|
|
|
|
|
|
|
|
return {
|
|
|
|
...banner,
|
|
|
|
width: Number(width),
|
|
|
|
height: Number(height),
|
|
|
|
tags: bannerTags[banner.id] || [],
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
2021-07-11 23:48:01 +00:00
|
|
|
await Promise.all([
|
|
|
|
knex('campaigns').delete(),
|
|
|
|
knex('banners_tags').delete(),
|
|
|
|
]);
|
2021-06-28 00:50:06 +00:00
|
|
|
|
2021-06-27 22:05:24 +00:00
|
|
|
await Promise.all([
|
2021-07-05 22:01:44 +00:00
|
|
|
knex('affiliates').delete(),
|
2021-06-27 22:05:24 +00:00
|
|
|
knex('banners').delete(),
|
|
|
|
]);
|
|
|
|
|
|
|
|
const [networks, channels, tags] = await Promise.all([
|
|
|
|
knex('entities')
|
|
|
|
.where('type', 'network')
|
2022-04-04 16:21:51 +00:00
|
|
|
.whereIn('slug', campaigns.concat(banners).map((link) => link.network).filter(Boolean)),
|
2021-06-27 22:05:24 +00:00
|
|
|
knex('entities')
|
|
|
|
.where('type', 'channel')
|
2022-04-04 16:21:51 +00:00
|
|
|
.whereIn('slug', campaigns.concat(banners).map((link) => link.channel).filter(Boolean)),
|
2021-06-27 22:05:24 +00:00
|
|
|
knex('tags')
|
2022-04-04 16:21:51 +00:00
|
|
|
.whereIn('slug', banners.flatMap((banner) => banner.tags || [])),
|
2022-07-18 00:42:30 +00:00
|
|
|
/*
|
|
|
|
knex('actors')
|
|
|
|
.whereIn('slug', banners.flatMap((banner) => banner.tags || [])),
|
|
|
|
*/
|
2021-06-27 22:05:24 +00:00
|
|
|
]);
|
|
|
|
|
|
|
|
const networksBySlug = networks.reduce((acc, network) => ({ ...acc, [network.slug]: network }), {});
|
|
|
|
const channelsBySlug = channels.reduce((acc, channel) => ({ ...acc, [channel.slug]: channel }), {});
|
|
|
|
const tagsBySlug = tags.reduce((acc, tag) => ({ ...acc, [tag.slug]: tag }), {});
|
|
|
|
|
2022-04-04 16:21:51 +00:00
|
|
|
const affiliatesWithEntityId = affiliates.map((affiliate) => ({
|
2021-07-05 22:01:44 +00:00
|
|
|
id: affiliate.id,
|
|
|
|
entity_id: networksBySlug[affiliate.network]?.id || channelsBySlug[affiliate.channel]?.id || null,
|
|
|
|
url: affiliate.url,
|
2021-07-11 23:41:18 +00:00
|
|
|
parameters: affiliate.parameters,
|
2021-07-05 22:01:44 +00:00
|
|
|
comment: affiliate.comment,
|
|
|
|
}));
|
|
|
|
|
2022-04-04 16:21:51 +00:00
|
|
|
const bannersWithEntityId = banners.map((banner) => ({
|
2021-06-27 22:05:24 +00:00
|
|
|
id: banner.id,
|
|
|
|
width: banner.width,
|
|
|
|
height: banner.height,
|
2022-07-18 00:42:30 +00:00
|
|
|
type: banner.type === 'gif' || banner.id.includes('animated') ? 'gif' : 'jpg',
|
|
|
|
entity_id: networksBySlug[banner.network]?.id || channelsBySlug[banner.channel]?.id || channelsBySlug[banner.network]?.id || null,
|
2021-06-27 22:05:24 +00:00
|
|
|
}));
|
|
|
|
|
2022-07-18 00:42:30 +00:00
|
|
|
const bannerTagEntries = banners.flatMap((banner) => banner.tags?.map((tag) => ({
|
2021-06-27 22:05:24 +00:00
|
|
|
banner_id: banner.id,
|
|
|
|
tag_id: tagsBySlug[tag].id,
|
|
|
|
})) || []);
|
|
|
|
|
2022-04-04 16:21:51 +00:00
|
|
|
const campaignsWithEntityIdAndAffiliateId = campaigns.map((campaign) => ({
|
2021-06-28 00:50:06 +00:00
|
|
|
entity_id: networksBySlug[campaign.network]?.id || channelsBySlug[campaign.channel]?.id,
|
|
|
|
url: campaign.url,
|
2021-07-05 22:01:44 +00:00
|
|
|
affiliate_id: campaign.affiliate,
|
2021-06-28 00:50:06 +00:00
|
|
|
banner_id: campaign.banner,
|
2022-04-04 16:21:51 +00:00
|
|
|
})).filter((link) => link.entity_id && (link.url || link.affiliate_id));
|
2021-06-28 00:50:06 +00:00
|
|
|
|
2021-07-05 22:01:44 +00:00
|
|
|
await knex('affiliates').insert(affiliatesWithEntityId);
|
2021-06-27 22:05:24 +00:00
|
|
|
await bulkInsert('banners', bannersWithEntityId, false);
|
2022-07-18 00:42:30 +00:00
|
|
|
await bulkInsert('banners_tags', bannerTagEntries, false);
|
2021-06-28 00:50:06 +00:00
|
|
|
await bulkInsert('campaigns', campaignsWithEntityIdAndAffiliateId, false);
|
2021-06-27 22:05:24 +00:00
|
|
|
});
|