From 20d0d860d3c301fec887c73bf181b99a0465a6d5 Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Mon, 22 Nov 2021 02:51:52 +0100 Subject: [PATCH] Fixed MindGeek scraper trying to acquire session from mindgeek.com --- src/scrapers/mindgeek.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/scrapers/mindgeek.js b/src/scrapers/mindgeek.js index cf4a30d7..9c4917b8 100644 --- a/src/scrapers/mindgeek.js +++ b/src/scrapers/mindgeek.js @@ -156,10 +156,14 @@ function getUrl(site) { } async function getSession(site, parameters) { + if (site.slug === 'mindgeek') { + // most MG sites have a parent network to acquire a session from, don't try to acquire session from mindgeek.com for independent channels + return null; + } + const cookieJar = new CookieJar(); const session = http.session({ cookieJar }); - // const res = await session.get(url); const sessionUrl = site.parameters?.siteId && !(site.parameters?.native || site.parameters?.childSession || site.parent?.parameters?.childSession) ? site.parent.url : site.url;