Compare commits

...

2 Commits

Author SHA1 Message Date
DebaucheryLibrarian 9f37ec4cff 1.203.6 2021-12-04 00:32:31 +01:00
DebaucheryLibrarian abd063a578 Removed window map from http module to prevent memory pile-up with update scraping. 2021-12-04 00:32:28 +01:00
4 changed files with 9 additions and 7 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "traxxx",
"version": "1.203.5",
"version": "1.203.6",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "traxxx",
"version": "1.203.5",
"version": "1.203.6",
"license": "ISC",
"dependencies": {
"@casl/ability": "^5.2.2",

View File

@ -1,6 +1,6 @@
{
"name": "traxxx",
"version": "1.203.5",
"version": "1.203.6",
"description": "All the latest porn releases in one place",
"main": "src/app.js",
"scripts": {

View File

@ -130,10 +130,10 @@ async function scrapeRelease(baseRelease, entitiesBySlug, type = 'scene') {
if (windows.has(pathname)) {
logger.debug(`Closing window for ${pathname}`);
}
windows.get(pathname)?.close();
windows.get(pathname).close();
windows.delete(pathname);
}
await waitImmediate;

View File

@ -10,7 +10,7 @@ const tunnel = require('tunnel');
const Bottleneck = require('bottleneck');
const { JSDOM, toughCookie } = require('jsdom');
const windows = require('./http-windows');
// const windows = require('./http-windows');
const logger = require('../logger')(__filename);
const virtualConsole = require('./virtual-console')(__filename);
@ -119,9 +119,11 @@ async function finalizeResult(res, options) {
const window = options?.parse ? new JSDOM(html, { virtualConsole, ...options.extract }).window : null;
const pathname = new URL(res.request.url).pathname.replace(/\//g, '_');
/* unable to clear from update scrapes, nor any way to distinguish deep scrapes
if (window) {
windows.set(pathname, window);
}
*/
if (argv.saveHtml) {
await fs.writeFile(`./html/${pathname}.html`, html);