-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
118 changed files
with
4,032 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
interface IPlayer { | ||
player: string; | ||
url: string; | ||
} | ||
export default function Docchi(anime: string, episode: number | string): Promise<{ | ||
status: number; | ||
message: string; | ||
episode_thumbnail?: string | null; | ||
episodes?: IPlayer[]; | ||
episode_next_url?: string | number; | ||
}>; | ||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
"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()); | ||
}); | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const axios_1 = __importDefault(require("axios")); | ||
function Docchi(anime, episode) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
var _a; | ||
try { | ||
const response = yield axios_1.default.get(`https://api.docchi.pl/v1/episodes/find/${anime}/${episode}`, { | ||
headers: { | ||
Accept: `application/json`, | ||
}, | ||
}); | ||
if (response.data.length <= 0) { | ||
return { | ||
status: 500, | ||
message: "Something went wrong!", | ||
}; | ||
} | ||
return { | ||
status: 200, | ||
message: "Mission Accomplished!", | ||
episode_thumbnail: (_a = response.data[0].bg) !== null && _a !== void 0 ? _a : null, | ||
episodes: response.data.map(function (x) { | ||
return { | ||
player: x.player_hosting, | ||
url: x.player, | ||
translator: x.translator_title.trim() === "" ? "none" : x.translator_title.trim() | ||
}; | ||
}), | ||
episode_next_url: Number(episode) + 1, | ||
}; | ||
} | ||
catch (error) { | ||
return { | ||
status: 500, | ||
message: "Something went wrong!", | ||
}; | ||
} | ||
}); | ||
} | ||
exports.default = Docchi; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
interface IPlayer { | ||
player: string; | ||
url: string; | ||
} | ||
export default function FrixySubs(anime: string, episode: number | string): Promise<{ | ||
status: number; | ||
message: string; | ||
episode_thumbnail?: string | null; | ||
episodes?: IPlayer[]; | ||
episode_next_url?: string | number; | ||
}>; | ||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
"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()); | ||
}); | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const axios_1 = __importDefault(require("axios")); | ||
function FrixySubs(anime, episode) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
try { | ||
const response = yield axios_1.default.get(`https://frixysubs.pl/api/anime/${anime}/${episode}`, { | ||
headers: { | ||
Accept: `application/json`, | ||
}, | ||
}); | ||
const { episode: { poster, players }, } = response.data; | ||
if (players.length <= 0) { | ||
return { | ||
status: 500, | ||
message: "Something went wrong!", | ||
}; | ||
} | ||
return { | ||
status: 200, | ||
message: "Mission Accomplished!", | ||
episode_thumbnail: poster !== null && poster !== void 0 ? poster : null, | ||
episodes: players.map(function (x) { | ||
return { | ||
player: x.name, | ||
url: x.link, | ||
}; | ||
}), | ||
episode_next_url: Number(episode) + 1, | ||
}; | ||
} | ||
catch (error) { | ||
return { | ||
status: 500, | ||
message: "Something went wrong!", | ||
}; | ||
} | ||
}); | ||
} | ||
exports.default = FrixySubs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export default function JuniorSubs(category: string | number, anime: string, episode: string | number): Promise<{ | ||
status: number; | ||
thumbnail?: string | null; | ||
}>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
"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()); | ||
}); | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const axios_1 = __importDefault(require("axios")); | ||
const jsdom_1 = require("jsdom"); | ||
const virtualConsole = new jsdom_1.VirtualConsole(); | ||
virtualConsole.on("error", () => { | ||
// No-op to skip console errors. | ||
}); | ||
function JuniorSubs(category, anime, episode) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
try { | ||
const response = yield axios_1.default.get(`https://juniorsubs.pl/${category}/${anime}`, { | ||
headers: { | ||
Referer: `https://juniorsubs.pl/${category}/${anime}`, | ||
"X-Requested-With": "XMLHttpRequest", | ||
}, | ||
}); | ||
const dom = new jsdom_1.JSDOM(response.data, { virtualConsole }); | ||
const items = dom.window.document.querySelectorAll(".elementor-container .elementor-column.elementor-element .elementor-widget-container .elementor-heading-title "); | ||
const thumbnails = dom.window.document.querySelectorAll(".elementor-container .elementor-column.elementor-element .elementor-widget-wrap .elementor-widget-image .elementor-widget-container"); | ||
let thumbnail = null; | ||
yield Promise.all(Array.from(items).map(function (x, index) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
if (!x || !x.textContent) | ||
return; | ||
const title = x.textContent.toLowerCase(); | ||
if (!title.includes("odcinek")) | ||
return; | ||
if (episode !== Number(title.replaceAll("odcinek", ""))) | ||
return; | ||
if (!thumbnails || !thumbnails[index - 1]) | ||
return; | ||
const tN = thumbnails[index - 1]; | ||
const tNIMG = tN.querySelector("img"); | ||
thumbnail = tNIMG.src || null; | ||
}); | ||
})); | ||
return { | ||
status: 200, | ||
thumbnail: thumbnail, | ||
}; | ||
} | ||
catch (error) { | ||
return { | ||
status: 500, | ||
}; | ||
} | ||
}); | ||
} | ||
exports.default = JuniorSubs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export default function MakiSubsAPI(action: string, post: string, nume: string, type: string): Promise<{ | ||
status: number; | ||
player?: string; | ||
}>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
"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()); | ||
}); | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const axios_1 = __importDefault(require("axios")); | ||
function MakiSubsAPI(action, post, nume, type) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
try { | ||
const form = new URLSearchParams(); | ||
form.append("action", action); | ||
form.append("post", post); | ||
form.append("nume", nume); | ||
form.append("type", type); | ||
const response = yield axios_1.default.post(`https://makisubs.online/wp-admin/admin-ajax.php`, form); | ||
if (!response.data.embed_url) { | ||
return { | ||
status: 500, | ||
}; | ||
} | ||
return { | ||
status: 200, | ||
player: response.data.embed_url, | ||
}; | ||
} | ||
catch (error) { | ||
return { | ||
status: 500, | ||
}; | ||
} | ||
}); | ||
} | ||
exports.default = MakiSubsAPI; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export default function MioroSubsAPI(action: string, post: string, nume: string, type: string): Promise<{ | ||
status: number; | ||
player?: string; | ||
}>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
"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()); | ||
}); | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const axios_1 = __importDefault(require("axios")); | ||
function MioroSubsAPI(action, post, nume, type) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
try { | ||
const form = new URLSearchParams(); | ||
form.append("action", action); | ||
form.append("post", post); | ||
form.append("nume", nume); | ||
form.append("type", type); | ||
const response = yield axios_1.default.post(`https://miorosubs.pl/wp-admin/admin-ajax.php`, form); | ||
if (!response.data.embed_url) { | ||
return { | ||
status: 500, | ||
}; | ||
} | ||
return { | ||
status: 200, | ||
player: response.data.embed_url, | ||
}; | ||
} | ||
catch (error) { | ||
return { | ||
status: 500, | ||
}; | ||
} | ||
}); | ||
} | ||
exports.default = MioroSubsAPI; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
interface IPlayer { | ||
player: string; | ||
url: string; | ||
} | ||
export default function OrfeuszSubs(anime: string, episode: number | string): Promise<{ | ||
status: number; | ||
message: string; | ||
episode_thumbnail?: string | null; | ||
episodes?: IPlayer[]; | ||
episode_next_url?: string | number; | ||
}>; | ||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
"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()); | ||
}); | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const OrfeuszSubsEpisodes_js_1 = __importDefault(require("./indirect/OrfeuszSubsEpisodes.js")); | ||
const OrfeuszSubsPlayers_js_1 = __importDefault(require("./indirect/OrfeuszSubsPlayers.js")); | ||
function OrfeuszSubs(anime, episode) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const episodeID = yield (0, OrfeuszSubsEpisodes_js_1.default)(anime, episode); | ||
if (episodeID.status !== 200 || !episodeID.episode_id) { | ||
return { | ||
status: 500, | ||
message: "Something went wrong!", | ||
}; | ||
} | ||
const orfeusz = yield (0, OrfeuszSubsPlayers_js_1.default)(episode, episodeID.episode_id, episodeID.bg); | ||
return orfeusz; | ||
}); | ||
} | ||
exports.default = OrfeuszSubs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export default function Wbijam({ slug, anime, }: { | ||
slug: string; | ||
anime: string; | ||
}): Promise<{ | ||
status: number; | ||
player?: string; | ||
}>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
"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()); | ||
}); | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const axios_1 = __importDefault(require("axios")); | ||
const jsdom_1 = require("jsdom"); | ||
const virtualConsole = new jsdom_1.VirtualConsole(); | ||
virtualConsole.on("error", () => { | ||
// No-op to skip console errors. | ||
}); | ||
function Wbijam(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ slug, anime, }) { | ||
try { | ||
const response = yield axios_1.default.get(`https://${anime}.wbijam.pl/odtwarzacz-${slug}.html`, { | ||
headers: { | ||
Referer: `https://${anime}.wbijam.pl/odtwarzacz-${slug}.html`, | ||
"X-Requested-With": "XMLHttpRequest", | ||
}, | ||
}); | ||
const dom = new jsdom_1.JSDOM(response.data, { virtualConsole }); | ||
const player_url = dom.window.document.querySelector("center iframe"); | ||
if (!player_url) { | ||
return { | ||
status: 500, | ||
}; | ||
} | ||
return { | ||
status: 200, | ||
player: player_url.src, | ||
}; | ||
} | ||
catch (error) { | ||
return { | ||
status: 500, | ||
}; | ||
} | ||
}); | ||
} | ||
exports.default = Wbijam; |
Oops, something went wrong.