This commit is contained in:
himanshu8443
2025-06-15 21:29:40 +05:30
commit 3f3e12f5df
299 changed files with 18729 additions and 0 deletions

30
dist/tokyoInsider/tokyoGetStream.js vendored Normal file
View File

@@ -0,0 +1,30 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.tokyoGetStream = void 0;
const tokyoGetStream = async function ({ link, providerContext, }) {
try {
const { cheerio } = providerContext;
const url = link;
const res = await fetch(url);
const data = await res.text();
const $ = cheerio.load(data);
const streamLinks = [];
$('.c_h1,.c_h2').map((i, element) => {
$(element).find('span').remove();
const title = $(element).find('a').text() || '';
const link = $(element).find('a').attr('href') || '';
if (title && link.includes('media')) {
streamLinks.push({
server: title,
link,
type: link.split('.').pop() || 'mkv',
});
}
});
return streamLinks;
}
catch (err) {
return [];
}
};
exports.tokyoGetStream = tokyoGetStream;