xvideosx 1.5.5 → 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 = 'https://www.xvideos.com' + $element.find('.title a').attr('href');
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 = "https://www.xvideos.com" + $element.find('.title a').attr('href');
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();
@@ -29,7 +29,7 @@ const newFresh = async ({ url, puppeteerConfig } = {}) => {
29
29
  thumbNail,
30
30
  duration,
31
31
  name,
32
- },
32
+ };
33
33
  }).get();
34
34
  return videos;
35
35
  } finally {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "xvideosx",
3
3
  "description": "xvideos.com api implementation.",
4
- "version": "1.5.5",
4
+ "version": "1.5.6",
5
5
  "main": "index.js",
6
6
  "license": "BSD-3-Clause",
7
7
  "repository": {