mirror of
https://github.com/vega-org/vega-providers.git
synced 2026-04-17 23:51:44 +00:00
unminify
This commit is contained in:
19
dist/primewire/catalog.js
vendored
19
dist/primewire/catalog.js
vendored
@@ -1 +1,18 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.genres=exports.catalog=void 0,exports.catalog=[{title:"Recently Added",filter:"/filter?sort=Just+Added&free_links=true"},{title:"TV Shows",filter:"/filter?sort=Trending+Today&type=tv"},{title:"Movies",filter:"/filter?sort=Trending+Today&type=movie"}],exports.genres=[];
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.genres = exports.catalog = void 0;
|
||||
exports.catalog = [
|
||||
{
|
||||
title: "Recently Added",
|
||||
filter: "/filter?sort=Just+Added&free_links=true",
|
||||
},
|
||||
{
|
||||
title: "TV Shows",
|
||||
filter: "/filter?sort=Trending+Today&type=tv",
|
||||
},
|
||||
{
|
||||
title: "Movies",
|
||||
filter: "/filter?sort=Trending+Today&type=movie",
|
||||
},
|
||||
];
|
||||
exports.genres = [];
|
||||
|
||||
90
dist/primewire/meta.js
vendored
90
dist/primewire/meta.js
vendored
@@ -1 +1,89 @@
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,i,n){return new(i||(i=Promise))(function(o,r){function s(t){try{c(n.next(t))}catch(t){r(t)}}function a(t){try{c(n.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getMeta=void 0;const getMeta=function(t){return __awaiter(this,arguments,void 0,function*({link:t,providerContext:e}){var i;try{const{axios:n,cheerio:o}=e,r=t,s=t.split("/").slice(0,3).join("/"),a=yield n.get(r),c=yield a.data,d=o.load(c),l=(null===(i=d(".movie_info").find('a[href*="imdb.com/title/tt"]:not([href*="imdb.com/title/tt/"])').attr("href"))||void 0===i?void 0:i.split("/")[4])||"",h=d(".show_season").html()?"series":"movie",u=[];return d(".show_season").each((t,e)=>{const i="Season "+d(e).attr("data-id"),n=[];d(e).children().each((t,e)=>{const i=d(e).find("a").children().remove().end().text().trim().replace("E","Epiosode "),o=s+d(e).find("a").attr("href");i&&o&&n.push({title:i,link:o})}),u.push({title:i,directLinks:n})}),"movie"===h&&u.push({title:"Movie",directLinks:[{link:t,title:"Movie",type:"movie"}]}),{title:"",image:"",imdbId:l,synopsis:"",type:h,linkList:u}}catch(t){return{title:"",image:"",imdbId:"",synopsis:"",linkList:[],type:"uhd"}}})};exports.getMeta=getMeta;
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getMeta = void 0;
|
||||
const getMeta = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ link, providerContext, }) {
|
||||
var _b;
|
||||
try {
|
||||
const { axios, cheerio } = providerContext;
|
||||
const url = link;
|
||||
const baseUrl = link.split("/").slice(0, 3).join("/");
|
||||
const res = yield axios.get(url);
|
||||
const html = yield res.data;
|
||||
const $ = cheerio.load(html);
|
||||
const imdbId = ((_b = $(".movie_info")
|
||||
.find('a[href*="imdb.com/title/tt"]:not([href*="imdb.com/title/tt/"])')
|
||||
.attr("href")) === null || _b === void 0 ? void 0 : _b.split("/")[4]) || "";
|
||||
const type = $(".show_season").html() ? "series" : "movie";
|
||||
const linkList = [];
|
||||
$(".show_season").each((i, element) => {
|
||||
const seasonTitle = "Season " + $(element).attr("data-id");
|
||||
const episodes = [];
|
||||
$(element)
|
||||
.children()
|
||||
.each((i, element2) => {
|
||||
const episodeTitle = $(element2)
|
||||
.find("a")
|
||||
.children()
|
||||
.remove()
|
||||
.end()
|
||||
.text()
|
||||
.trim()
|
||||
.replace("E", "Epiosode ");
|
||||
const episodeLink = baseUrl + $(element2).find("a").attr("href");
|
||||
if (episodeTitle && episodeLink) {
|
||||
episodes.push({
|
||||
title: episodeTitle,
|
||||
link: episodeLink,
|
||||
});
|
||||
}
|
||||
});
|
||||
linkList.push({
|
||||
title: seasonTitle,
|
||||
directLinks: episodes,
|
||||
});
|
||||
});
|
||||
if (type === "movie") {
|
||||
linkList.push({
|
||||
title: "Movie",
|
||||
directLinks: [
|
||||
{
|
||||
link: link,
|
||||
title: "Movie",
|
||||
type: "movie",
|
||||
},
|
||||
],
|
||||
});
|
||||
}
|
||||
return {
|
||||
title: "",
|
||||
image: "",
|
||||
imdbId: imdbId,
|
||||
synopsis: "",
|
||||
type: type,
|
||||
linkList: linkList,
|
||||
};
|
||||
}
|
||||
catch (error) {
|
||||
console.error(error);
|
||||
return {
|
||||
title: "",
|
||||
image: "",
|
||||
imdbId: "",
|
||||
synopsis: "",
|
||||
linkList: [],
|
||||
type: "uhd",
|
||||
};
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getMeta = getMeta;
|
||||
|
||||
64
dist/primewire/posts.js
vendored
64
dist/primewire/posts.js
vendored
@@ -1 +1,63 @@
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,i,r){return new(i||(i=Promise))(function(s,n){function o(t){try{c(r.next(t))}catch(t){n(t)}}function a(t){try{c(r.throw(t))}catch(t){n(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(o,a)}c((r=r.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getSearchPosts=exports.getPosts=void 0;const getPosts=function(t){return __awaiter(this,arguments,void 0,function*({filter:t,page:e,signal:i,providerContext:r}){const{getBaseUrl:s,axios:n,cheerio:o}=r,a=yield s("primewire");return posts({baseUrl:a,url:`${a+t}&page=${e}`,signal:i,axios:n,cheerio:o})})};exports.getPosts=getPosts;const getSearchPosts=function(t){return __awaiter(this,arguments,void 0,function*({searchQuery:t,page:e,signal:i,providerContext:r}){const{getBaseUrl:s,axios:n,cheerio:o,Aes:a}=r,c=yield s("primewire");return posts({baseUrl:c,url:`${c}/filter?s=${t}&page=${e}&ds=${(yield function(t){return __awaiter(this,void 0,void 0,function*(){return yield a.sha1(t)})}(t+"JyjId97F9PVqUPuMO0")).slice(0,10)}`,signal:i,axios:n,cheerio:o})})};function posts(t){return __awaiter(this,arguments,void 0,function*({baseUrl:t,url:e,signal:i,axios:r,cheerio:s}){try{const n=(yield r.get(e,{signal:i})).data,o=s.load(n),a=[];return o(".index_item.index_item_ie").map((e,i)=>{const r=o(i).find("a").attr("title"),s=o(i).find("a").attr("href"),n=o(i).find("img").attr("src")||"";r&&s&&a.push({title:r,link:t+s,image:n})}),a}catch(t){return[]}})}exports.getSearchPosts=getSearchPosts;
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getSearchPosts = exports.getPosts = void 0;
|
||||
const getPosts = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ filter, page, signal, providerContext, }) {
|
||||
const { getBaseUrl, axios, cheerio } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("primewire");
|
||||
const url = `${baseUrl + filter}&page=${page}`;
|
||||
return posts({ baseUrl, url, signal, axios, cheerio });
|
||||
});
|
||||
};
|
||||
exports.getPosts = getPosts;
|
||||
const getSearchPosts = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ searchQuery, page, signal, providerContext, }) {
|
||||
const { getBaseUrl, axios, cheerio, Aes } = providerContext;
|
||||
const getSHA256ofJSON = function (input) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return yield Aes.sha1(input);
|
||||
});
|
||||
};
|
||||
const baseUrl = yield getBaseUrl("primewire");
|
||||
const hash = yield getSHA256ofJSON(searchQuery + "JyjId97F9PVqUPuMO0");
|
||||
const url = `${baseUrl}/filter?s=${searchQuery}&page=${page}&ds=${hash.slice(0, 10)}`;
|
||||
return posts({ baseUrl, url, signal, axios, cheerio });
|
||||
});
|
||||
};
|
||||
exports.getSearchPosts = getSearchPosts;
|
||||
function posts(_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ baseUrl, url, signal, axios, cheerio, }) {
|
||||
try {
|
||||
const res = yield axios.get(url, { signal });
|
||||
const data = res.data;
|
||||
const $ = cheerio.load(data);
|
||||
const catalog = [];
|
||||
$(".index_item.index_item_ie").map((i, element) => {
|
||||
const title = $(element).find("a").attr("title");
|
||||
const link = $(element).find("a").attr("href");
|
||||
const image = $(element).find("img").attr("src") || "";
|
||||
if (title && link) {
|
||||
catalog.push({
|
||||
title: title,
|
||||
link: baseUrl + link,
|
||||
image: image,
|
||||
});
|
||||
}
|
||||
});
|
||||
return catalog;
|
||||
}
|
||||
catch (err) {
|
||||
console.error("primewire error ", err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
138
dist/primewire/stream.js
vendored
138
dist/primewire/stream.js
vendored
@@ -1 +1,137 @@
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(r,o){function c(e){try{s(i.next(e))}catch(e){o(e)}}function a(e){try{s(i.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(c,a)}s((i=i.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getStream=void 0;const getStream=function(e){return __awaiter(this,arguments,void 0,function*({link:e,type:t,providerContext:n}){var i,r,o,c,a,s;const{axios:l,cheerio:p}=n;try{const t=e.split("/").slice(0,3).join("/"),n=[],h=[],f=(yield l.get(e)).data,m=p.load(f);m('tr:contains("mixdrop")').map((e,n)=>{const i=m(n).find(".wp-menu-btn").attr("data-wp-menu"),r=m(n).find(".wp-menu-btn").next().text();i&&h.push({id:t+"/links/go/"+i,size:r})});for(const e of h){const t=yield l.head(e.id),p=null===(i=t.request)||void 0===i?void 0:i.responseURL.replace("/f/","/e/"),h=yield fetch(p,{credentials:"include",headers:{"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0",Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8","Accept-Language":"en-US,en;q=0.5","Upgrade-Insecure-Requests":"1","Sec-Fetch-Dest":"iframe","Sec-Fetch-Mode":"navigate","Sec-Fetch-Site":"same-origin",Pragma:"no-cache","Cache-Control":"no-cache",referer:null===(r=t.request)||void 0===r?void 0:r.responseURL},referrer:null===(o=t.request)||void 0===o?void 0:o.responseURL,method:"GET",mode:"cors"}),f=yield h.text();var u=/eval\(function\((.*?)\)\{.*?return p\}.*?\('(.*?)'\.split/.exec(f);let m="";if(u){var d=u[2];const i=Number(d.split(",'|MDCore|")[0].split(",")[d.split(",'|MDCore|")[0].split(",").length-1]);m=null===(c=d.split(`',${i},`))||void 0===c?void 0:c[0].trim();let r=i,o=d.split(`',${i},`)[1].slice(2).split("|").length,l=d.split(`',${i},`)[1].slice(2).split("|");const p=function(e,t,n,i,r,o){if(r=function(e){return e.toString(36)},!"".replace(/^/,String)){for(;n--;)o[n.toString(t)]=i[n]||n.toString(t);i=[function(e){return o[e]}],r=function(){return"\\w+"},n=1}for(;n--;)i[n]&&(e=e.replace(new RegExp("\\b"+r(n)+"\\b","g"),i[n]));return e},h=p(m,r,o,l,0,{}),f="https:"+(null===(a=h.match(/MDCore\.wurl="([^"]+)"/))||void 0===a?void 0:a[1]);n.push({server:"Mixdrop "+e.size,link:f,type:"mp4",headers:{"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0",Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8","Accept-Language":"en-US,en;q=0.5","Upgrade-Insecure-Requests":"1","Sec-Fetch-Dest":"iframe","Sec-Fetch-Mode":"navigate","Sec-Fetch-Site":"same-origin",Pragma:"no-cache","Cache-Control":"no-cache",referer:null===(s=t.request)||void 0===s?void 0:s.responseURL}})}}return n}catch(e){return[]}})};exports.getStream=getStream;
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getStream = void 0;
|
||||
const getStream = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ link: url, type, providerContext, }) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
const { axios, cheerio } = providerContext;
|
||||
try {
|
||||
console.log("pwGetStream", type, url);
|
||||
const baseUrl = url.split("/").slice(0, 3).join("/");
|
||||
const streamLinks = [];
|
||||
const urls = [];
|
||||
const res = yield axios.get(url);
|
||||
const data = res.data;
|
||||
const $ = cheerio.load(data);
|
||||
$('tr:contains("mixdrop")').map((i, element) => {
|
||||
const id = $(element).find(".wp-menu-btn").attr("data-wp-menu");
|
||||
const size = $(element).find(".wp-menu-btn").next().text();
|
||||
if (id) {
|
||||
urls.push({ id: baseUrl + "/links/go/" + id, size });
|
||||
}
|
||||
});
|
||||
console.log("urls", urls);
|
||||
for (const url of urls) {
|
||||
const res2 = yield axios.head(url.id);
|
||||
const location = (_b = res2.request) === null || _b === void 0 ? void 0 : _b.responseURL.replace("/f/", "/e/");
|
||||
const res3 = yield fetch(location, {
|
||||
credentials: "include",
|
||||
headers: {
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0",
|
||||
Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
|
||||
"Accept-Language": "en-US,en;q=0.5",
|
||||
"Upgrade-Insecure-Requests": "1",
|
||||
"Sec-Fetch-Dest": "iframe",
|
||||
"Sec-Fetch-Mode": "navigate",
|
||||
"Sec-Fetch-Site": "same-origin",
|
||||
Pragma: "no-cache",
|
||||
"Cache-Control": "no-cache",
|
||||
referer: (_c = res2.request) === null || _c === void 0 ? void 0 : _c.responseURL,
|
||||
},
|
||||
referrer: (_d = res2.request) === null || _d === void 0 ? void 0 : _d.responseURL,
|
||||
method: "GET",
|
||||
mode: "cors",
|
||||
});
|
||||
const data3 = yield res3.text();
|
||||
// let MDCore: any = {};
|
||||
// Step 1: Extract the function parameters and the encoded string
|
||||
var functionRegex = /eval\(function\((.*?)\)\{.*?return p\}.*?\('(.*?)'\.split/;
|
||||
var match = functionRegex.exec(data3);
|
||||
let p = "";
|
||||
if (match) {
|
||||
// var params = match[1].split(',').map(param => param.trim());
|
||||
var encodedString = match[2];
|
||||
console.log("Encoded String:", encodedString);
|
||||
// console.log('Parameters:', params);
|
||||
// console.log('Encoded String:', encodedString.split("',36,")[0], '🔥🔥');
|
||||
const base = Number(encodedString.split(",'|MDCore|")[0].split(",")[encodedString.split(",'|MDCore|")[0].split(",").length - 1]);
|
||||
console.log("Base:", base);
|
||||
p = (_e = encodedString.split(`',${base},`)) === null || _e === void 0 ? void 0 : _e[0].trim();
|
||||
let a = base;
|
||||
let c = encodedString.split(`',${base},`)[1].slice(2).split("|").length;
|
||||
let k = encodedString.split(`',${base},`)[1].slice(2).split("|");
|
||||
// console.log('p:', p);
|
||||
// console.log('a:', a);
|
||||
// console.log('c:', c);
|
||||
// console.log('k:', k);
|
||||
const decode = function (p, a, c, k, e, d) {
|
||||
e = function (c) {
|
||||
return c.toString(36);
|
||||
};
|
||||
if (!"".replace(/^/, String)) {
|
||||
while (c--) {
|
||||
d[c.toString(a)] = k[c] || c.toString(a);
|
||||
}
|
||||
k = [
|
||||
function (e) {
|
||||
return d[e];
|
||||
},
|
||||
];
|
||||
e = function () {
|
||||
return "\\w+";
|
||||
};
|
||||
c = 1;
|
||||
}
|
||||
while (c--) {
|
||||
if (k[c]) {
|
||||
p = p.replace(new RegExp("\\b" + e(c) + "\\b", "g"), k[c]);
|
||||
}
|
||||
}
|
||||
return p;
|
||||
};
|
||||
const decoded = decode(p, a, c, k, 0, {});
|
||||
// get MDCore.wurl=
|
||||
const wurl = (_f = decoded.match(/MDCore\.wurl="([^"]+)"/)) === null || _f === void 0 ? void 0 : _f[1];
|
||||
console.log("wurl:", wurl);
|
||||
const streamUrl = "https:" + wurl;
|
||||
console.log("streamUrl:", streamUrl);
|
||||
streamLinks.push({
|
||||
server: "Mixdrop " + url.size,
|
||||
link: streamUrl,
|
||||
type: "mp4",
|
||||
headers: {
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0",
|
||||
Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
|
||||
"Accept-Language": "en-US,en;q=0.5",
|
||||
"Upgrade-Insecure-Requests": "1",
|
||||
"Sec-Fetch-Dest": "iframe",
|
||||
"Sec-Fetch-Mode": "navigate",
|
||||
"Sec-Fetch-Site": "same-origin",
|
||||
Pragma: "no-cache",
|
||||
"Cache-Control": "no-cache",
|
||||
referer: (_g = res2.request) === null || _g === void 0 ? void 0 : _g.responseURL,
|
||||
},
|
||||
});
|
||||
}
|
||||
else {
|
||||
console.log("No match found");
|
||||
}
|
||||
}
|
||||
return streamLinks;
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getStream = getStream;
|
||||
|
||||
Reference in New Issue
Block a user