Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
anKordii committed Apr 7, 2024
1 parent 1e24f57 commit d7e20c3
Show file tree
Hide file tree
Showing 118 changed files with 4,032 additions and 0 deletions.
12 changes: 12 additions & 0 deletions dist/cjs/apis/Docchi.d.ts
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 {};
53 changes: 53 additions & 0 deletions dist/cjs/apis/Docchi.js
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;
12 changes: 12 additions & 0 deletions dist/cjs/apis/FrixySubs.d.ts
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 {};
52 changes: 52 additions & 0 deletions dist/cjs/apis/FrixySubs.js
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;
4 changes: 4 additions & 0 deletions dist/cjs/apis/JuniorSubs.d.ts
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;
}>;
62 changes: 62 additions & 0 deletions dist/cjs/apis/JuniorSubs.js
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;
4 changes: 4 additions & 0 deletions dist/cjs/apis/MakiSubs.d.ts
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;
}>;
42 changes: 42 additions & 0 deletions dist/cjs/apis/MakiSubs.js
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;
4 changes: 4 additions & 0 deletions dist/cjs/apis/MioroSubs.d.ts
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;
}>;
42 changes: 42 additions & 0 deletions dist/cjs/apis/MioroSubs.js
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;
12 changes: 12 additions & 0 deletions dist/cjs/apis/OrfeuszSubs.d.ts
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 {};
30 changes: 30 additions & 0 deletions dist/cjs/apis/OrfeuszSubs.js
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;
7 changes: 7 additions & 0 deletions dist/cjs/apis/Wbijam.d.ts
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;
}>;
49 changes: 49 additions & 0 deletions dist/cjs/apis/Wbijam.js
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;
Loading

0 comments on commit d7e20c3

Please sign in to comment.