(.*?)<\/p>/g;
4 |
5 | async function scrape(embedURL) {
6 | try {
7 | const {body} = await got(embedURL);
8 | const regexData = REGEX.exec(body);
9 |
10 | if (!regexData || !regexData[1]) {
11 | return null;
12 | }
13 |
14 | const token = regexData[1];
15 | const {url} = await got.head(`https://verystream.com/gettoken/${token}?mime=true`);
16 |
17 | return url;
18 | } catch (error) {
19 | return null;
20 | }
21 | }
22 |
23 | module.exports = {
24 | scrape
25 | };
26 |
27 | /*
28 | (async () => {
29 | const stream = await scrape('https://verystream.com/e/butmYPdd4Pd');
30 | console.log(stream);
31 | })();
32 | */
--------------------------------------------------------------------------------
/scrapers/hosts/vev.js:
--------------------------------------------------------------------------------
1 | const got = require('got');
2 |
3 | async function scrape(embedURL) {
4 | const streams = [];
5 |
6 | const id = embedURL.split('/').pop();
7 |
8 | const response = await got.post(`https://vev.io/api/serve/video/${id}`, {
9 | headers: {
10 | Referer: `https://vev.io/${id}`,
11 | referer: `https://vev.io/${id}`
12 | },
13 | body: {},
14 | json: true
15 | });
16 | const body = response.body;
17 |
18 | const qualities = body.qualities;
19 | const labels = Object.keys(qualities);
20 |
21 | for (const label of labels) {
22 | streams.push({
23 | file: qualities[label],
24 | quality: label
25 | });
26 | }
27 |
28 | return streams;
29 | }
30 |
31 | /*
32 | (async () => {
33 | const stream = await scrape('https://vev.io/embed/zl32d7d771ov');
34 | console.log(stream);
35 | })();
36 | */
37 |
38 | module.exports = {
39 | scrape
40 | };
--------------------------------------------------------------------------------
/scrapers/hosts/vidlox.js:
--------------------------------------------------------------------------------
1 | const got = require('got');
2 | const JSON5 = require('json5');
3 |
4 | const sourcesRegex = /sources:.*?(\[.*?\])/;
5 |
6 | async function scrape(embedURL) {
7 | const {body} = await got(embedURL);
8 |
9 | let sources = sourcesRegex.exec(body);
10 | if (sources && sources[1]) {
11 | sources = JSON5.parse(sources[1]);
12 | }
13 |
14 | return sources;
15 | }
16 |
17 | module.exports = {
18 | scrape
19 | };
20 |
21 | /*
22 | (async () => {
23 | const stream = await scrape('https://vidlox.me/embed-b1i7sp68nuly');
24 | console.log(stream);
25 | })();
26 | */
--------------------------------------------------------------------------------
/scrapers/hosts/vidoza.js:
--------------------------------------------------------------------------------
1 | const got = require('got');
2 |
3 | const REGEX = /