Close browser page after get version from title
parent
04d1b864c3
commit
70cfa36b4f
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue