From 70cfa36b4f26a33faa098cf9592b9b8e986b3472 Mon Sep 17 00:00:00 2001 From: "samuele.berlusconi" Date: Thu, 22 Oct 2020 13:50:58 +0200 Subject: [PATCH] Close browser page after get version from title --- app/scripts/game-scraper.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/scripts/game-scraper.js b/app/scripts/game-scraper.js index 0fea13c..af4785d 100644 --- a/app/scripts/game-scraper.js +++ b/app/scripts/game-scraper.js @@ -100,6 +100,7 @@ module.exports.getGameVersionFromTitle = async function (browser, info) { const endIndex = title.indexOf("]", startIndex); let version = title.substring(startIndex, endIndex).trim().toUpperCase(); if (version.startsWith("V")) version = version.replace("V", ""); // Replace only the first occurrence + await page.close(); return version; };