mirror of
https://github.com/kodjodevf/mangayomi-extensions.git
synced 2026-02-14 10:51:17 +00:00
fix & add new extractors
This commit is contained in:
@@ -98,13 +98,12 @@ class AnimeOnlineNinja extends MProvider {
|
|||||||
List<MVideo> a = [];
|
List<MVideo> a = [];
|
||||||
if (url.contains("saidochesto.top") || lang == "MULTISERVER") {
|
if (url.contains("saidochesto.top") || lang == "MULTISERVER") {
|
||||||
return await extractFromMulti(url);
|
return await extractFromMulti(url);
|
||||||
} else if (url.contains("filemoon")) {
|
} else if (["filemoon", "moon", "filemooon"].any((a) => url.contains(a))) {
|
||||||
a = await filemoonExtractor(url, "$lang Filemoon - ", "");
|
a = await filemoonExtractor(url, "$lang Filemoon - ", "");
|
||||||
} else if (url.contains("https://dood") ||
|
} else if (["https://dood", "https://ds2play", "https://d0"]
|
||||||
url.contains("https://ds2play") ||
|
.any((a) => url.contains(a))) {
|
||||||
url.contains("https://d0")) {
|
|
||||||
a = await doodExtractor(url, "$lang DoodStream");
|
a = await doodExtractor(url, "$lang DoodStream");
|
||||||
} else if (url.contains("streamtape")) {
|
} else if (["streamtape", "stp", "stape"].any((a) => url.contains(a))) {
|
||||||
a = await streamTapeExtractor(url, "$lang StreamTape");
|
a = await streamTapeExtractor(url, "$lang StreamTape");
|
||||||
} else if (url.contains("uqload")) {
|
} else if (url.contains("uqload")) {
|
||||||
a = await uqloadExtractor(url, lang);
|
a = await uqloadExtractor(url, lang);
|
||||||
@@ -122,12 +121,52 @@ class AnimeOnlineNinja extends MProvider {
|
|||||||
..quality = "$lang WolfStream";
|
..quality = "$lang WolfStream";
|
||||||
|
|
||||||
a = [video];
|
a = [video];
|
||||||
|
} else if (["wishembed", "streamwish", "strwish", "wish"]
|
||||||
|
.any((a) => url.contains(a))) {
|
||||||
|
a = await streamWishExtractor(url, "$lang StreamWish");
|
||||||
|
} else if (url.contains("mp4upload")) {
|
||||||
|
a = await mp4UploadExtractor(url, null, "$lang", "");
|
||||||
|
} else if (["vidhide", "filelions.top", "vid."]
|
||||||
|
.any((a) => url.contains(a))) {
|
||||||
|
a = await streamHideExtractor(url, lang);
|
||||||
}
|
}
|
||||||
videos.addAll(a);
|
videos.addAll(a);
|
||||||
|
|
||||||
return videos;
|
return videos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<List<MVideo>> streamHideExtractor(String url, String prefix) async {
|
||||||
|
final res = (await client.get(Uri.parse(url))).body;
|
||||||
|
final masterUrl = substringBefore(
|
||||||
|
substringAfter(
|
||||||
|
substringAfter(
|
||||||
|
substringAfter(unpackJs(res), "sources:"), "file:\""),
|
||||||
|
"src:\""),
|
||||||
|
'"');
|
||||||
|
final masterPlaylistRes = (await client.get(Uri.parse(masterUrl))).body;
|
||||||
|
List<MVideo> videos = [];
|
||||||
|
for (var it in substringAfter(masterPlaylistRes, "#EXT-X-STREAM-INF:")
|
||||||
|
.split("#EXT-X-STREAM-INF:")) {
|
||||||
|
final quality =
|
||||||
|
"${substringBefore(substringBefore(substringAfter(substringAfter(it, "RESOLUTION="), "x"), ","), "\n")}p";
|
||||||
|
|
||||||
|
String videoUrl = substringBefore(substringAfter(it, "\n"), "\n");
|
||||||
|
|
||||||
|
if (!videoUrl.startsWith("http")) {
|
||||||
|
videoUrl =
|
||||||
|
"${masterUrl.split("/").sublist(0, masterUrl.split("/").length - 1).join("/")}/$videoUrl";
|
||||||
|
}
|
||||||
|
|
||||||
|
MVideo video = MVideo();
|
||||||
|
video
|
||||||
|
..url = videoUrl
|
||||||
|
..originalUrl = videoUrl
|
||||||
|
..quality = "$prefix StreamHideVid - $quality";
|
||||||
|
videos.add(video);
|
||||||
|
}
|
||||||
|
return videos;
|
||||||
|
}
|
||||||
|
|
||||||
Future<List<MVideo>> uqloadExtractor(String url, String lang) async {
|
Future<List<MVideo>> uqloadExtractor(String url, String lang) async {
|
||||||
final res = (await client.get(Uri.parse(url))).body;
|
final res = (await client.get(Uri.parse(url))).body;
|
||||||
final js = xpath(res, '//script[contains(text(), "sources:")]/text()');
|
final js = xpath(res, '//script[contains(text(), "sources:")]/text()');
|
||||||
@@ -206,7 +245,7 @@ class AnimeOnlineNinja extends MProvider {
|
|||||||
entries: ["SUB", "All", "ES", "LAT"],
|
entries: ["SUB", "All", "ES", "LAT"],
|
||||||
entryValues: ["SUB", "", "ES", "LAT"]),
|
entryValues: ["SUB", "", "ES", "LAT"]),
|
||||||
ListPreference(
|
ListPreference(
|
||||||
key: "preferred_server_",
|
key: "preferred_server1",
|
||||||
title: "Preferred server",
|
title: "Preferred server",
|
||||||
summary: "",
|
summary: "",
|
||||||
valueIndex: 0,
|
valueIndex: 0,
|
||||||
@@ -216,7 +255,10 @@ class AnimeOnlineNinja extends MProvider {
|
|||||||
"StreamTape",
|
"StreamTape",
|
||||||
"Uqload",
|
"Uqload",
|
||||||
"WolfStream",
|
"WolfStream",
|
||||||
"saidochesto.top"
|
"saidochesto.top",
|
||||||
|
"VidHide",
|
||||||
|
"StreamWish",
|
||||||
|
"Mp4Upload"
|
||||||
],
|
],
|
||||||
entryValues: [
|
entryValues: [
|
||||||
"Filemoon",
|
"Filemoon",
|
||||||
@@ -224,14 +266,17 @@ class AnimeOnlineNinja extends MProvider {
|
|||||||
"StreamTape",
|
"StreamTape",
|
||||||
"Uqload",
|
"Uqload",
|
||||||
"WolfStream",
|
"WolfStream",
|
||||||
"saidochesto.top"
|
"saidochesto.top",
|
||||||
|
"VidHide",
|
||||||
|
"StreamWish",
|
||||||
|
"Mp4Upload"
|
||||||
]),
|
]),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
List<MVideo> sortVideos(List<MVideo> videos, int sourceId) {
|
List<MVideo> sortVideos(List<MVideo> videos, int sourceId) {
|
||||||
String prefLang = getPreferenceValue(source.id, "preferred_lang");
|
String prefLang = getPreferenceValue(source.id, "preferred_lang");
|
||||||
String server = getPreferenceValue(sourceId, "preferred_server_");
|
String server = getPreferenceValue(sourceId, "preferred_server1");
|
||||||
videos.sort((MVideo a, MVideo b) {
|
videos.sort((MVideo a, MVideo b) {
|
||||||
int qualityMatchA = 0;
|
int qualityMatchA = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import '../../../../../model/source.dart';
|
import '../../../../../model/source.dart';
|
||||||
|
|
||||||
Source get animeonlineninjaSource => _animeonlineninjaSource;
|
Source get animeonlineninjaSource => _animeonlineninjaSource;
|
||||||
const _animeonlineninjaVersion = "0.0.15";
|
const _animeonlineninjaVersion = "0.0.2";
|
||||||
const _animeonlineninjaSourceCodeUrl =
|
const _animeonlineninjaSourceCodeUrl =
|
||||||
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/dart/anime/src/es/animeonlineninja/animeonlineninja.dart";
|
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/dart/anime/src/es/animeonlineninja/animeonlineninja.dart";
|
||||||
Source _animeonlineninjaSource = Source(
|
Source _animeonlineninjaSource = Source(
|
||||||
|
|||||||
Reference in New Issue
Block a user