mirror of
https://github.com/vega-org/vega-providers.git
synced 2026-04-17 15:41:45 +00:00
minify again
This commit is contained in:
64
dist/drive/catalog.js
vendored
64
dist/drive/catalog.js
vendored
@@ -1,63 +1 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.genres = exports.catalog = void 0;
|
||||
exports.catalog = [
|
||||
{
|
||||
title: "Latest",
|
||||
filter: "",
|
||||
},
|
||||
{
|
||||
title: "Anime",
|
||||
filter: "category/anime/",
|
||||
},
|
||||
{
|
||||
title: "Netflix",
|
||||
filter: "category/netflix/",
|
||||
},
|
||||
{
|
||||
title: "4K",
|
||||
filter: "category/2160p-4k/",
|
||||
},
|
||||
];
|
||||
exports.genres = [
|
||||
{
|
||||
title: "Action",
|
||||
filter: "/category/action",
|
||||
},
|
||||
{
|
||||
title: "Crime",
|
||||
filter: "/category/crime",
|
||||
},
|
||||
{
|
||||
title: "Comedy",
|
||||
filter: "/category/comedy",
|
||||
},
|
||||
{
|
||||
title: "Drama",
|
||||
filter: "/category/drama",
|
||||
},
|
||||
{
|
||||
title: "Horror",
|
||||
filter: "/category/horror",
|
||||
},
|
||||
{
|
||||
title: "Family",
|
||||
filter: "/category/family",
|
||||
},
|
||||
{
|
||||
title: "Sci-Fi",
|
||||
filter: "/category/sifi",
|
||||
},
|
||||
{
|
||||
title: "Thriller",
|
||||
filter: "/category/triller",
|
||||
},
|
||||
{
|
||||
title: "Romance",
|
||||
filter: "/category/romance",
|
||||
},
|
||||
{
|
||||
title: "Fight",
|
||||
filter: "/category/fight",
|
||||
},
|
||||
];
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.genres=exports.catalog=void 0,exports.catalog=[{title:"Latest",filter:""},{title:"Anime",filter:"category/anime/"},{title:"Netflix",filter:"category/netflix/"},{title:"4K",filter:"category/2160p-4k/"}],exports.genres=[{title:"Action",filter:"/category/action"},{title:"Crime",filter:"/category/crime"},{title:"Comedy",filter:"/category/comedy"},{title:"Drama",filter:"/category/drama"},{title:"Horror",filter:"/category/horror"},{title:"Family",filter:"/category/family"},{title:"Sci-Fi",filter:"/category/sifi"},{title:"Thriller",filter:"/category/triller"},{title:"Romance",filter:"/category/romance"},{title:"Fight",filter:"/category/fight"}];
|
||||
46
dist/drive/episodes.js
vendored
46
dist/drive/episodes.js
vendored
@@ -1,45 +1 @@
|
||||
"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.getEpisodes = void 0;
|
||||
const getEpisodes = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ url, providerContext, }) {
|
||||
try {
|
||||
const { axios, cheerio } = providerContext;
|
||||
const res = yield axios.get(url);
|
||||
const html = res.data;
|
||||
let $ = cheerio.load(html);
|
||||
const episodeLinks = [];
|
||||
$('a:contains("HubCloud")').map((i, element) => {
|
||||
const title = $(element).parent().prev().text();
|
||||
const link = $(element).attr("href");
|
||||
if (link && (title.includes("Ep") || title.includes("Download"))) {
|
||||
episodeLinks.push({
|
||||
title: title.includes("Download") ? "Play" : title,
|
||||
link,
|
||||
});
|
||||
}
|
||||
});
|
||||
// console.log(episodeLinks);
|
||||
return episodeLinks;
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return [
|
||||
{
|
||||
title: "Server 1",
|
||||
link: url,
|
||||
},
|
||||
];
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getEpisodes = getEpisodes;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(thisArg,_arguments,P,generator){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){var value;result.done?resolve(result.value):(value=result.value,value instanceof P?value:new P(function(resolve){resolve(value)})).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getEpisodes=void 0;const getEpisodes=function(_a){return __awaiter(this,arguments,void 0,function*({url:url,providerContext:providerContext}){try{const{axios:axios,cheerio:cheerio}=providerContext,html=(yield axios.get(url)).data;let $=cheerio.load(html);const episodeLinks=[];return $('a:contains("HubCloud")').map((i,element)=>{const title=$(element).parent().prev().text(),link=$(element).attr("href");link&&(title.includes("Ep")||title.includes("Download"))&&episodeLinks.push({title:title.includes("Download")?"Play":title,link:link})}),episodeLinks}catch(err){return[{title:"Server 1",link:url}]}})};exports.getEpisodes=getEpisodes;
|
||||
86
dist/drive/meta.js
vendored
86
dist/drive/meta.js
vendored
@@ -1,85 +1 @@
|
||||
"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 res = yield axios.get(url);
|
||||
const data = res.data;
|
||||
const $ = cheerio.load(data);
|
||||
const type = $(".left-wrapper")
|
||||
.text()
|
||||
.toLocaleLowerCase()
|
||||
.includes("movie name")
|
||||
? "movie"
|
||||
: "series";
|
||||
const imdbId = ((_b = $('a:contains("IMDb")').attr("href")) === null || _b === void 0 ? void 0 : _b.split("/")[4]) || "";
|
||||
const title = $(".left-wrapper").find('strong:contains("Name")').next().text() ||
|
||||
$(".left-wrapper")
|
||||
.find('strong:contains("Name"),h5:contains("Name")')
|
||||
.find("span:first")
|
||||
.text();
|
||||
const synopsis = $(".left-wrapper")
|
||||
.find('h2:contains("Storyline"),h3:contains("Storyline"),h5:contains("Storyline"),h4:contains("Storyline"),h4:contains("STORYLINE")')
|
||||
.next()
|
||||
.text() ||
|
||||
$(".ipc-html-content-inner-div").text() ||
|
||||
"";
|
||||
const image = $("img.entered.lazyloaded,img.entered,img.litespeed-loaded").attr("src") ||
|
||||
$("img.aligncenter").attr("src") ||
|
||||
"";
|
||||
// Links
|
||||
const links = [];
|
||||
$('a:contains("1080")a:not(:contains("Zip")),a:contains("720")a:not(:contains("Zip")),a:contains("480")a:not(:contains("Zip")),a:contains("2160")a:not(:contains("Zip")),a:contains("4k")a:not(:contains("Zip"))').map((i, element) => {
|
||||
var _a;
|
||||
const title = $(element).parent("h5").prev().text();
|
||||
const episodesLink = $(element).attr("href");
|
||||
const quality = ((_a = title.match(/\b(480p|720p|1080p|2160p)\b/i)) === null || _a === void 0 ? void 0 : _a[0]) || "";
|
||||
if (episodesLink && title) {
|
||||
links.push({
|
||||
title,
|
||||
episodesLink: type === "series" ? episodesLink : "",
|
||||
directLinks: type === "movie"
|
||||
? [{ title: "Movie", link: episodesLink, type: "movie" }]
|
||||
: [],
|
||||
quality: quality,
|
||||
});
|
||||
}
|
||||
});
|
||||
// console.log('drive meta', title, synopsis, image, imdbId, type, links);
|
||||
console.log("drive meta", links, type);
|
||||
return {
|
||||
title,
|
||||
synopsis,
|
||||
image,
|
||||
imdbId,
|
||||
type,
|
||||
linkList: links,
|
||||
};
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return {
|
||||
title: "",
|
||||
synopsis: "",
|
||||
image: "",
|
||||
imdbId: "",
|
||||
type: "movie",
|
||||
linkList: [],
|
||||
};
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getMeta = getMeta;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(thisArg,_arguments,P,generator){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){var value;result.done?resolve(result.value):(value=result.value,value instanceof P?value:new P(function(resolve){resolve(value)})).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getMeta=void 0;const getMeta=function(_a){return __awaiter(this,arguments,void 0,function*({link:link,providerContext:providerContext}){var _b;try{const{axios:axios,cheerio:cheerio}=providerContext,url=link,data=(yield axios.get(url)).data,$=cheerio.load(data),type=$(".left-wrapper").text().toLocaleLowerCase().includes("movie name")?"movie":"series",imdbId=(null===(_b=$('a:contains("IMDb")').attr("href"))||void 0===_b?void 0:_b.split("/")[4])||"",title=$(".left-wrapper").find('strong:contains("Name")').next().text()||$(".left-wrapper").find('strong:contains("Name"),h5:contains("Name")').find("span:first").text(),synopsis=$(".left-wrapper").find('h2:contains("Storyline"),h3:contains("Storyline"),h5:contains("Storyline"),h4:contains("Storyline"),h4:contains("STORYLINE")').next().text()||$(".ipc-html-content-inner-div").text()||"",image=$("img.entered.lazyloaded,img.entered,img.litespeed-loaded").attr("src")||$("img.aligncenter").attr("src")||"",links=[];return $('a:contains("1080")a:not(:contains("Zip")),a:contains("720")a:not(:contains("Zip")),a:contains("480")a:not(:contains("Zip")),a:contains("2160")a:not(:contains("Zip")),a:contains("4k")a:not(:contains("Zip"))').map((i,element)=>{var _a;const title=$(element).parent("h5").prev().text(),episodesLink=$(element).attr("href"),quality=(null===(_a=title.match(/\b(480p|720p|1080p|2160p)\b/i))||void 0===_a?void 0:_a[0])||"";episodesLink&&title&&links.push({title:title,episodesLink:"series"===type?episodesLink:"",directLinks:"movie"===type?[{title:"Movie",link:episodesLink,type:"movie"}]:[],quality:quality})}),{title:title,synopsis:synopsis,image:image,imdbId:imdbId,type:type,linkList:links}}catch(err){return{title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]}}})};exports.getMeta=getMeta;
|
||||
61
dist/drive/posts.js
vendored
61
dist/drive/posts.js
vendored
@@ -1,60 +1 @@
|
||||
"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 } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("drive");
|
||||
const url = `${baseUrl + filter}/page/${page}/`;
|
||||
return posts({ url, signal, providerContext });
|
||||
});
|
||||
};
|
||||
exports.getPosts = getPosts;
|
||||
const getSearchPosts = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ searchQuery, page, signal, providerContext, }) {
|
||||
const { getBaseUrl } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("drive");
|
||||
const url = `${baseUrl}page/${page}/?s=${searchQuery}`;
|
||||
return posts({ url, signal, providerContext });
|
||||
});
|
||||
};
|
||||
exports.getSearchPosts = getSearchPosts;
|
||||
function posts(_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ url, signal, providerContext, }) {
|
||||
try {
|
||||
const { cheerio } = providerContext;
|
||||
const res = yield fetch(url, { signal });
|
||||
const data = yield res.text();
|
||||
const $ = cheerio.load(data);
|
||||
const catalog = [];
|
||||
$(".recent-movies")
|
||||
.children()
|
||||
.map((i, element) => {
|
||||
const title = $(element).find("figure").find("img").attr("alt");
|
||||
const link = $(element).find("a").attr("href");
|
||||
const image = $(element).find("figure").find("img").attr("src");
|
||||
if (title && link && image) {
|
||||
catalog.push({
|
||||
title: title.replace("Download", "").trim(),
|
||||
link: link,
|
||||
image: image,
|
||||
});
|
||||
}
|
||||
});
|
||||
return catalog;
|
||||
}
|
||||
catch (err) {
|
||||
console.error("drive error ", err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
}
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(thisArg,_arguments,P,generator){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){var value;result.done?resolve(result.value):(value=result.value,value instanceof P?value:new P(function(resolve){resolve(value)})).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getSearchPosts=exports.getPosts=void 0;const getPosts=function(_a){return __awaiter(this,arguments,void 0,function*({filter:filter,page:page,signal:signal,providerContext:providerContext}){const{getBaseUrl:getBaseUrl}=providerContext;return posts({url:`${(yield getBaseUrl("drive"))+filter}/page/${page}/`,signal:signal,providerContext:providerContext})})};exports.getPosts=getPosts;const getSearchPosts=function(_a){return __awaiter(this,arguments,void 0,function*({searchQuery:searchQuery,page:page,signal:signal,providerContext:providerContext}){const{getBaseUrl:getBaseUrl}=providerContext;return posts({url:`${yield getBaseUrl("drive")}page/${page}/?s=${searchQuery}`,signal:signal,providerContext:providerContext})})};function posts(_a){return __awaiter(this,arguments,void 0,function*({url:url,signal:signal,providerContext:providerContext}){try{const{cheerio:cheerio}=providerContext,res=yield fetch(url,{signal:signal}),data=yield res.text(),$=cheerio.load(data),catalog=[];return $(".recent-movies").children().map((i,element)=>{const title=$(element).find("figure").find("img").attr("alt"),link=$(element).find("a").attr("href"),image=$(element).find("figure").find("img").attr("src");title&&link&&image&&catalog.push({title:title.replace("Download","").trim(),link:link,image:image})}),catalog}catch(err){return[]}})}exports.getSearchPosts=getSearchPosts;
|
||||
46
dist/drive/stream.js
vendored
46
dist/drive/stream.js
vendored
@@ -1,45 +1 @@
|
||||
"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, signal, providerContext, }) {
|
||||
var _b, _c;
|
||||
const headers = providerContext.commonHeaders;
|
||||
try {
|
||||
if (type === "movie") {
|
||||
const res = yield providerContext.axios.get(url, { headers });
|
||||
const html = res.data;
|
||||
const $ = providerContext.cheerio.load(html);
|
||||
const link = $('a:contains("HubCloud")').attr("href");
|
||||
url = link || url;
|
||||
}
|
||||
const res = yield providerContext.axios.get(url, { headers });
|
||||
let redirectUrl = (_b = res.data.match(/<meta\s+http-equiv="refresh"\s+content="[^"]*?;\s*url=([^"]+)"\s*\/?>/i)) === null || _b === void 0 ? void 0 : _b[1];
|
||||
if (url.includes("/archives/")) {
|
||||
redirectUrl = (_c = res.data.match(/<a\s+[^>]*href="(https:\/\/hubcloud\.[^\/]+\/[^"]+)"/i)) === null || _c === void 0 ? void 0 : _c[1];
|
||||
}
|
||||
if (!redirectUrl) {
|
||||
return yield providerContext.extractors.hubcloudExtracter(url, signal);
|
||||
}
|
||||
const res2 = yield providerContext.axios.get(redirectUrl, { headers });
|
||||
const data = res2.data;
|
||||
const $ = providerContext.cheerio.load(data);
|
||||
const hubcloudLink = $(".fa-file-download").parent().attr("href");
|
||||
return yield providerContext.extractors.hubcloudExtracter((hubcloudLink === null || hubcloudLink === void 0 ? void 0 : hubcloudLink.includes("https://hubcloud")) ? hubcloudLink : redirectUrl, signal);
|
||||
}
|
||||
catch (err) {
|
||||
console.error("Movies Drive err", err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getStream = getStream;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(thisArg,_arguments,P,generator){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){var value;result.done?resolve(result.value):(value=result.value,value instanceof P?value:new P(function(resolve){resolve(value)})).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getStream=void 0;const getStream=function(_a){return __awaiter(this,arguments,void 0,function*({link:url,type:type,signal:signal,providerContext:providerContext}){var _b,_c;const headers=providerContext.commonHeaders;try{if("movie"===type){const html=(yield providerContext.axios.get(url,{headers:headers})).data,$=providerContext.cheerio.load(html);url=$('a:contains("HubCloud")').attr("href")||url}const res=yield providerContext.axios.get(url,{headers:headers});let redirectUrl=null===(_b=res.data.match(/<meta\s+http-equiv="refresh"\s+content="[^"]*?;\s*url=([^"]+)"\s*\/?>/i))||void 0===_b?void 0:_b[1];if(url.includes("/archives/")&&(redirectUrl=null===(_c=res.data.match(/<a\s+[^>]*href="(https:\/\/hubcloud\.[^\/]+\/[^"]+)"/i))||void 0===_c?void 0:_c[1]),!redirectUrl)return yield providerContext.extractors.hubcloudExtracter(url,signal);const data=(yield providerContext.axios.get(redirectUrl,{headers:headers})).data,hubcloudLink=providerContext.cheerio.load(data)(".fa-file-download").parent().attr("href");return yield providerContext.extractors.hubcloudExtracter((null==hubcloudLink?void 0:hubcloudLink.includes("https://hubcloud"))?hubcloudLink:redirectUrl,signal)}catch(err){return[]}})};exports.getStream=getStream;
|
||||
Reference in New Issue
Block a user