Closure-RI commited on
Commit
01cc808
·
verified ·
1 Parent(s): d38ffcc

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +26 -23
index.js CHANGED
@@ -1039,35 +1039,38 @@ async function XnxxDown(inputUrl) {
1039
  });
1040
  const page = await browser.newPage();
1041
  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;]");
1042
- await page.goto("https://www.xnxxvideodownload.com/", { waitUntil: 'domcontentloaded' });
1043
- await page.type('#ytUrl', inputUrl);
1044
- await page.click('#convBtn');
1045
- await page.waitForNavigation({ waitUntil: 'networkidle0' });
1046
- await page.waitForSelector("body > main > section.e.j.d2.dsection > div > div.thumbdiv > img");
1047
- const thumbnail = await page.$eval(
1048
- "body > main > section.e.j.d2.dsection > div > div.thumbdiv > img",
1049
- el => el.src || null
1050
  );
1051
- const quality = await page.$eval(
1052
- "#dtable > table > tbody > tr > td:nth-child(1)",
1053
- el => el.textContent.trim() || null
 
 
 
 
 
 
1054
  );
1055
- const fileExt = await page.$eval(
1056
- "#dtable > table > tbody > tr > td:nth-child(2)",
1057
- el => el.textContent.trim() || null
 
1058
  );
1059
- const downloadUrl = await page.$eval(
1060
- "#dtable > table > tbody > tr > td:nth-child(3) > a",
1061
- el => el.href || null
 
1062
  );
 
1063
  await browser.close();
1064
 
1065
- return {
1066
- thumbnail: thumbnail || 'Thumbnail not available',
1067
- quality: quality || 'Quality not available',
1068
- fileExt: fileExt || 'File extension not available',
1069
- downloadUrl: downloadUrl || 'Download URL not available'
1070
- };
1071
  }
1072
 
1073
  app.get('/xnxx/download', async (req, res) => {
 
1039
  });
1040
  const page = await browser.newPage();
1041
  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;]");
1042
+
1043
+ await page.goto(`https://www.locoloader.com/?url=${encodeURIComponent(inputUrl)}`, { waitUntil: 'domcontentloaded' });
1044
+ await page.waitForSelector("#extraction > div > div.hl > h1 > a");
1045
+
1046
+ const title = await page.$eval(
1047
+ "#extraction > div > div.hl > h1 > a",
1048
+ el => el.innerText.trim()
 
1049
  );
1050
+
1051
+ const url = await page.$eval(
1052
+ "#extraction > div > div.hl > h1 > a",
1053
+ el => el.href
1054
+ );
1055
+
1056
+ const img = await page.$eval(
1057
+ "#extraction > div > div.content-final-single__thumb-wrapper > div > div > img",
1058
+ el => el.src
1059
  );
1060
+
1061
+ const type = await page.$eval(
1062
+ "#extraction > div > div:nth-child(3) > div.display-table-cell.linkInfo > div.icon-media",
1063
+ el => el.innerText.trim()
1064
  );
1065
+
1066
+ const downloadLink = await page.$eval(
1067
+ "#extraction > div > div:nth-child(3) > div.display-table-cell.linkButtons > a.bt.dl",
1068
+ el => el.href
1069
  );
1070
+
1071
  await browser.close();
1072
 
1073
+ return { title, url, img, type, downloadLink };
 
 
 
 
 
1074
  }
1075
 
1076
  app.get('/xnxx/download', async (req, res) => {