From 9ca2ec6dd0bfcce2e5769acf97e609b53593f8dc Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Tue, 5 Jan 2021 16:27:20 +0100 Subject: [PATCH] Fixed parent entity relations in seed file. Fixed MindGeek scraper session URL determination. --- seeds/01_networks.js | 2 +- seeds/02_sites.js | 3 ++- src/scrapers/mindgeek.js | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/seeds/01_networks.js b/seeds/01_networks.js index 123dd2fc..50e9c75b 100644 --- a/seeds/01_networks.js +++ b/seeds/01_networks.js @@ -540,7 +540,7 @@ exports.seed = knex => Promise.resolve() url: network.url, description: network.description, parameters: network.parameters, - parent_id: parentNetworksBySlug[network.parent] || null, + parent_id: parentNetworksBySlug[network.parent] || grandParentNetworksBySlug[network.parent] || null, })); const networkEntries = await upsert('entities', networksWithParent, ['slug', 'type'], knex); diff --git a/seeds/02_sites.js b/seeds/02_sites.js index a7862178..78d34e5f 100644 --- a/seeds/02_sites.js +++ b/seeds/02_sites.js @@ -6719,10 +6719,11 @@ const sites = [ }, { name: 'Tranny Surprise', + slug: 'trannysurprise', url: 'https://www.trannysurprise.com', description: 'If you’re in the mood for graphic tranny porn, look no further than TrannySurprise.com. A sexy shemale is a thing of beauty, often possessing a voracious appetite for sex. Reality Kings is home to some of the most incredible transsexual pornstars on the net. Watch them stroke their huge dicks and massage their voluminous ball sacks in our full-length HD videos. All these goddesses want to do is suck dick until it erupts in their wide open mouths. Cum swallowing is their specialty so enjoy our scenes full of creamy jizz loads overflowing onto their giant tits and firm stomachs. These nude RK shemales live to get rimjobs before getting drilled by gigantic dicks. Messy creampies are usually how their nights end so witness the torrid fuck marathons leading up to juicy orgasms. Tranny Surprise features sensual ladyboys that know just how to please anyone looking to take a walk on the wild side. Premium porno is what you deserve so eat it all up with our luscious, busty trannies. Long legs, tight asses, toned physiques, and a healthy dose of raw animal passion is what our “chicks with dicks” deliver in every one of our erotic films.', + tags: ['transsexual'], parameters: { native: true }, - slug: 'trannysurprise', parent: 'realitykings', }, { diff --git a/src/scrapers/mindgeek.js b/src/scrapers/mindgeek.js index 6beba0d6..7f9313db 100644 --- a/src/scrapers/mindgeek.js +++ b/src/scrapers/mindgeek.js @@ -86,7 +86,7 @@ function scrapeLatestX(data, site, filterChannel) { } async function scrapeLatest(items, site, filterChannel) { - const latestReleases = await Promise.all(items.map(async data => scrapeLatestX(data, site, filterChannel))); + const latestReleases = items.map(data => scrapeLatestX(data, site, filterChannel)); return latestReleases.filter(Boolean); } @@ -148,7 +148,7 @@ async function getSession(site) { const session = http.session({ cookieJar }); // const res = await session.get(url); - const sessionUrl = site.parameters?.siteId && !(site.parameters?.childSession || site.parent?.parameters?.childSession) + const sessionUrl = site.parameters?.siteId && !(site.parameters?.native || site.parameters?.childSession || site.parent?.parameters?.childSession) ? site.parent.url : site.url;