xvideosx 1.6.0 → 1.6.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -9,6 +9,14 @@ const extractorUrl = (imageUrl) => {
|
|
9
9
|
return newUrl;
|
10
10
|
} return null;
|
11
11
|
};
|
12
|
+
const viewsExtractor = (views) => {
|
13
|
+
const regex = /(\d+(?:[,.]\d+)?[MK])/i;
|
14
|
+
const match = views.match(regex);
|
15
|
+
if (match && match[1]) {
|
16
|
+
const views = match[1];
|
17
|
+
return views;
|
18
|
+
} return null;
|
19
|
+
};
|
12
20
|
|
13
21
|
const parseVideo = ($, video) => {
|
14
22
|
const $video = $(video);
|
@@ -19,7 +27,8 @@ const parseVideo = ($, video) => {
|
|
19
27
|
const preview = extractorUrl(thumbNail);
|
20
28
|
const duration = $video.find('p.metadata > span.bg > span.duration').text();
|
21
29
|
const channel = $video.find('.metadata .name').text();
|
22
|
-
const
|
30
|
+
const viewsData = $video.find('p.metadata > span.bg > span:nth-child(2)').text().trim();
|
31
|
+
const views = viewsExtractor(viewsData);
|
23
32
|
|
24
33
|
return {
|
25
34
|
title,
|