Closure-RI commited on
Commit
0030020
·
verified ·
1 Parent(s): 2b0d0dc

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +4 -3
index.js CHANGED
@@ -576,12 +576,13 @@ app.get('/html', async (req, res) => {
576
  async function XnDl(url) {
577
  const browser = await puppeteer.launch({
578
  headless: true,
579
- args: ['--no-sandbox', '--disable-setuid-sandbox'],
580
  timeout: 60000 // Timeout untuk peluncuran browser
581
  });
582
 
583
  try {
584
- const context = await browser.createIncognitoBrowserContext()
 
585
  const page = await context.newPage();
586
  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;]");
587
 
@@ -1113,7 +1114,7 @@ async function XnxxDown(inputUrl) {
1113
  headless: true,
1114
  args: ['--no-sandbox', '--disable-setuid-sandbox']
1115
  });
1116
- const context = await browser.createIncognitoBrowserContext()
1117
  const page = await context.newPage();
1118
  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;]");
1119
 
 
576
  async function XnDl(url) {
577
  const browser = await puppeteer.launch({
578
  headless: true,
579
+ args: ['--no-sandbox', '--disable-setuid-sandbox','--incognito'],
580
  timeout: 60000 // Timeout untuk peluncuran browser
581
  });
582
 
583
  try {
584
+ const context = await browser.createBrowserContext();
585
+ // Create a new page inside context.
586
  const page = await context.newPage();
587
  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;]");
588
 
 
1114
  headless: true,
1115
  args: ['--no-sandbox', '--disable-setuid-sandbox']
1116
  });
1117
+ const context = await browser.newPage()
1118
  const page = await context.newPage();
1119
  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;]");
1120