xvideosx 1.5.4 → 1.5.6
Sign up to get free protection for your applications and to get access to all the features.
@@ -27,7 +27,7 @@ const details = async ({ url, puppeteerConfig } = {}) => {
|
|
27
27
|
const title = $element.find('.title a').text();
|
28
28
|
const duration = $element.find('.duration').text();
|
29
29
|
const channel = $element.find('.metadata .name').text();
|
30
|
-
const url =
|
30
|
+
const url = `https://www.videos.com${$element.find('.title a').attr('href')}`;
|
31
31
|
const thumbNail = $element.find('.thumb img').attr('src');
|
32
32
|
return {
|
33
33
|
title,
|
@@ -35,9 +35,8 @@ const details = async ({ url, puppeteerConfig } = {}) => {
|
|
35
35
|
channel,
|
36
36
|
thumbNail,
|
37
37
|
url,
|
38
|
-
}
|
39
|
-
}).get()
|
40
|
-
|
38
|
+
};
|
39
|
+
}).get();
|
41
40
|
|
42
41
|
const videoScript = $('#video-player-bg > script:nth-child(6)').html();
|
43
42
|
const files = {
|
@@ -60,7 +59,7 @@ const details = async ({ url, puppeteerConfig } = {}) => {
|
|
60
59
|
videoWidth,
|
61
60
|
videoHeight,
|
62
61
|
files,
|
63
|
-
videos
|
62
|
+
videos,
|
64
63
|
};
|
65
64
|
} finally {
|
66
65
|
if (browser) await browser.close();
|
@@ -11,13 +11,13 @@ const newFresh = async ({ url, puppeteerConfig } = {}) => {
|
|
11
11
|
await page.goto(url, { waitUntil: 'networkidle2' });
|
12
12
|
const html = await page.content();
|
13
13
|
const $ = cheerio.load(html);
|
14
|
-
const data = $('div[class=mozaique]').html()
|
14
|
+
const data = $('div[class=mozaique]').html();
|
15
15
|
const $getVideos = cheerio.load(data);
|
16
16
|
const mozaique = $getVideos('.thumb-block');
|
17
17
|
const videos = mozaique.map((index, element) => {
|
18
18
|
const $element = $getVideos(element);
|
19
19
|
const title = $element.find('.title a').attr('title');
|
20
|
-
const url =
|
20
|
+
const url = `https://www.xvideos.com"${$element.find('.title a').attr('href')}`;
|
21
21
|
const thumbNail = $element.find('.thumb img').attr('src');
|
22
22
|
const duration = $element.find('.duration').text();
|
23
23
|
const name = $element.find('.metadata .name').text();
|
@@ -26,10 +26,10 @@ const newFresh = async ({ url, puppeteerConfig } = {}) => {
|
|
26
26
|
|
27
27
|
title,
|
28
28
|
url,
|
29
|
-
|
29
|
+
thumbNail,
|
30
30
|
duration,
|
31
31
|
name,
|
32
|
-
}
|
32
|
+
};
|
33
33
|
}).get();
|
34
34
|
return videos;
|
35
35
|
} finally {
|