Spaces:
Paused
Paused
Update index.js
Browse files
index.js
CHANGED
|
@@ -38,7 +38,6 @@ const bodyParser = require('body-parser');
|
|
| 38 |
app.use(bodyParser.json());
|
| 39 |
|
| 40 |
|
| 41 |
-
|
| 42 |
const tempDirBase = tempDir
|
| 43 |
const https = require('https');
|
| 44 |
|
|
@@ -266,7 +265,9 @@ async function XnxxDown(inputUrl) {
|
|
| 266 |
headless: true,
|
| 267 |
args: ['--no-sandbox', '--disable-setuid-sandbox']
|
| 268 |
});
|
| 269 |
-
const
|
|
|
|
|
|
|
| 270 |
await page.setUserAgent("Mozilla/5.0 (Linux; Android 10; SM-G965U Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/114.0.5735.141 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/420.0.0.32.61;]");
|
| 271 |
|
| 272 |
await page.goto(`https://www.locoloader.com/?url=${encodeURIComponent(inputUrl)}`, { waitUntil: 'domcontentloaded' });
|
|
@@ -405,10 +406,12 @@ class XvideosScraper {
|
|
| 405 |
this.baseURL = 'https://www.xvideos.com';
|
| 406 |
this.browser = null;
|
| 407 |
this.page = null;
|
|
|
|
| 408 |
}
|
| 409 |
async initialize() {
|
| 410 |
this.browser = await puppeteer.launch({ headless: true, args: ['--no-sandbox', '--disable-setuid-sandbox'] });
|
| 411 |
-
this.
|
|
|
|
| 412 |
await this.page.setUserAgent("Mozilla/5.0 (Linux; Android 10; SM-G965U Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/114.0.5735.141 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/420.0.0.32.61;]");
|
| 413 |
}
|
| 414 |
|
|
|
|
| 38 |
app.use(bodyParser.json());
|
| 39 |
|
| 40 |
|
|
|
|
| 41 |
const tempDirBase = tempDir
|
| 42 |
const https = require('https');
|
| 43 |
|
|
|
|
| 265 |
headless: true,
|
| 266 |
args: ['--no-sandbox', '--disable-setuid-sandbox']
|
| 267 |
});
|
| 268 |
+
const context = await browser.createIncognitoBrowserContext();
|
| 269 |
+
|
| 270 |
+
const page = await context.newPage();
|
| 271 |
await page.setUserAgent("Mozilla/5.0 (Linux; Android 10; SM-G965U Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/114.0.5735.141 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/420.0.0.32.61;]");
|
| 272 |
|
| 273 |
await page.goto(`https://www.locoloader.com/?url=${encodeURIComponent(inputUrl)}`, { waitUntil: 'domcontentloaded' });
|
|
|
|
| 406 |
this.baseURL = 'https://www.xvideos.com';
|
| 407 |
this.browser = null;
|
| 408 |
this.page = null;
|
| 409 |
+
this.context = null;
|
| 410 |
}
|
| 411 |
async initialize() {
|
| 412 |
this.browser = await puppeteer.launch({ headless: true, args: ['--no-sandbox', '--disable-setuid-sandbox'] });
|
| 413 |
+
this.context = await this.browser.createIncognitoBrowserContext();
|
| 414 |
+
this.page = await this.context.newPage();
|
| 415 |
await this.page.setUserAgent("Mozilla/5.0 (Linux; Android 10; SM-G965U Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/114.0.5735.141 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/420.0.0.32.61;]");
|
| 416 |
}
|
| 417 |
|