mirror of
https://github.com/kodjodevf/mangayomi-extensions.git
synced 2026-02-14 10:51:17 +00:00
Refactor
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import 'dart:convert';
|
||||
import 'package:bridge_lib/bridge_lib.dart';
|
||||
|
||||
getPopularAnime(MangaModel anime) async {
|
||||
getPopularAnime(MManga anime) async {
|
||||
final data = {"url": "https://www.okanime.xyz"};
|
||||
final res = await MBridge.http('GET', json.encode(data));
|
||||
if (res.isEmpty) {
|
||||
@@ -19,7 +19,7 @@ getPopularAnime(MangaModel anime) async {
|
||||
return anime;
|
||||
}
|
||||
|
||||
getAnimeDetail(MangaModel anime) async {
|
||||
getAnimeDetail(MManga anime) async {
|
||||
final statusList = [
|
||||
{"يعرض الان": 0, "مكتمل": 1}
|
||||
];
|
||||
@@ -52,7 +52,7 @@ getAnimeDetail(MangaModel anime) async {
|
||||
return anime;
|
||||
}
|
||||
|
||||
getLatestUpdatesAnime(MangaModel anime) async {
|
||||
getLatestUpdatesAnime(MManga anime) async {
|
||||
final data = {
|
||||
"url": "https://www.okanime.xyz/espisode-list?page=${anime.page}"
|
||||
};
|
||||
@@ -78,7 +78,7 @@ getLatestUpdatesAnime(MangaModel anime) async {
|
||||
return anime;
|
||||
}
|
||||
|
||||
searchAnime(MangaModel anime) async {
|
||||
searchAnime(MManga anime) async {
|
||||
String url = "https://www.okanime.xyz/search/?s=${anime.query}";
|
||||
if (anime.page > 1) {
|
||||
url += "&page=${anime.page}";
|
||||
@@ -106,7 +106,7 @@ searchAnime(MangaModel anime) async {
|
||||
return anime;
|
||||
}
|
||||
|
||||
getVideoList(MangaModel anime) async {
|
||||
getVideoList(MManga anime) async {
|
||||
final datas = {"url": anime.link};
|
||||
final res = await MBridge.http('GET', json.encode(datas));
|
||||
|
||||
@@ -116,11 +116,11 @@ getVideoList(MangaModel anime) async {
|
||||
final urls = MBridge.xpath(res, '//*[@id="streamlinks"]/a/@data-src');
|
||||
final qualities = MBridge.xpath(res, '//*[@id="streamlinks"]/a/span/text()');
|
||||
|
||||
List<VideoModel> videos = [];
|
||||
List<MVideo> videos = [];
|
||||
for (var i = 0; i < urls.length; i++) {
|
||||
final url = urls[i];
|
||||
final quality = getQuality(qualities[i]);
|
||||
List<VideoModel> a = [];
|
||||
List<MVideo> a = [];
|
||||
|
||||
if (url.contains("https://doo")) {
|
||||
a = await MBridge.doodExtractor(url, "DoodStream - $quality");
|
||||
@@ -2,7 +2,7 @@ import '../../../../model/source.dart';
|
||||
import '../../../../utils/utils.dart';
|
||||
|
||||
Source get okanimeSource => _okanimeSource;
|
||||
const okanimeVersion = "0.0.1";
|
||||
const okanimeVersion = "0.0.2";
|
||||
const okanimeSourceCodeUrl =
|
||||
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/main/anime/src/ar/okanime/okanime-v$okanimeVersion.dart";
|
||||
Source _okanimeSource = Source(
|
||||
@@ -13,5 +13,4 @@ Source _okanimeSource = Source(
|
||||
iconUrl: getIconUrl("okanime", "ar"),
|
||||
sourceCodeUrl: okanimeSourceCodeUrl,
|
||||
version: okanimeVersion,
|
||||
appMinVerReq: "0.0.48",
|
||||
isManga: false);
|
||||
|
||||
@@ -1,26 +1,21 @@
|
||||
import 'dart:convert';
|
||||
import 'package:bridge_lib/bridge_lib.dart';
|
||||
|
||||
getPopularAnime(MangaModel anime) async {
|
||||
getPopularAnime(MManga anime) async {
|
||||
final data = {"url": "${anime.baseUrl}/most-popular?page=${anime.page}"};
|
||||
final res = await MBridge.http('GET', json.encode(data));
|
||||
if (res.isEmpty) {
|
||||
return anime;
|
||||
}
|
||||
|
||||
return animeElementM(res, anime);
|
||||
}
|
||||
|
||||
getLatestUpdatesAnime(MangaModel anime) async {
|
||||
getLatestUpdatesAnime(MManga anime) async {
|
||||
final data = {"url": "${anime.baseUrl}/top-airing?page=${anime.page}"};
|
||||
final res = await MBridge.http('GET', json.encode(data));
|
||||
if (res.isEmpty) {
|
||||
return anime;
|
||||
}
|
||||
|
||||
return animeElementM(res, anime);
|
||||
}
|
||||
|
||||
getAnimeDetail(MangaModel anime) async {
|
||||
getAnimeDetail(MManga anime) async {
|
||||
final statusList = [
|
||||
{
|
||||
"Currently Airing": 0,
|
||||
@@ -107,18 +102,16 @@ getAnimeDetail(MangaModel anime) async {
|
||||
return anime;
|
||||
}
|
||||
|
||||
searchAnime(MangaModel anime) async {
|
||||
searchAnime(MManga anime) async {
|
||||
final data = {
|
||||
"url": "${anime.baseUrl}/search?keyword=${anime.query}&page=${anime.page}"
|
||||
};
|
||||
final res = await MBridge.http('GET', json.encode(data));
|
||||
if (res.isEmpty) {
|
||||
return anime;
|
||||
}
|
||||
|
||||
return animeElementM(res, anime);
|
||||
}
|
||||
|
||||
getVideoList(MangaModel anime) async {
|
||||
getVideoList(MManga anime) async {
|
||||
final id = MBridge.substringAfterLast(anime.link, '?ep=');
|
||||
final datas = {
|
||||
"url":
|
||||
@@ -152,7 +145,7 @@ getVideoList(MangaModel anime) async {
|
||||
attributes: "data-type",
|
||||
typeRegExp: 0);
|
||||
|
||||
List<VideoModel> videos = [];
|
||||
List<MVideo> videos = [];
|
||||
|
||||
for (var i = 0; i < names.length; i++) {
|
||||
final name = names[i];
|
||||
@@ -168,7 +161,7 @@ getVideoList(MangaModel anime) async {
|
||||
String url = MBridge.substringBefore(
|
||||
MBridge.substringAfter(resE, "\"link\":\""), "\"");
|
||||
print(url);
|
||||
List<VideoModel> a = [];
|
||||
List<MVideo> a = [];
|
||||
if (name.contains("Vidstreaming")) {
|
||||
a = await MBridge.rapidCloudExtractor(url, "Vidstreaming - $subDub");
|
||||
videos.addAll(a);
|
||||
@@ -184,7 +177,7 @@ getVideoList(MangaModel anime) async {
|
||||
return videos;
|
||||
}
|
||||
|
||||
MangaModel animeElementM(String res, MangaModel anime) async {
|
||||
MManga animeElementM(String res, MManga anime) async {
|
||||
if (res.isEmpty) {
|
||||
return anime;
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
import '../../../../model/source.dart';
|
||||
import '../../../../utils/utils.dart';
|
||||
|
||||
const aniwatchVersion = "0.0.21";
|
||||
const aniwatchVersion = "0.0.3";
|
||||
const aniwatchSourceCodeUrl =
|
||||
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/main/anime/src/en/aniwatch/aniwatch-v$aniwatchVersion.dart";
|
||||
|
||||
@@ -15,7 +15,6 @@ List<Source> _aniwatchSourcesList = [
|
||||
iconUrl: getIconUrl("aniwatch", "en"),
|
||||
version: aniwatchVersion,
|
||||
isManga: false,
|
||||
appMinVerReq: "0.0.45",
|
||||
sourceCodeUrl: aniwatchSourceCodeUrl),
|
||||
Source(
|
||||
name: "Kaido.to",
|
||||
@@ -25,6 +24,5 @@ List<Source> _aniwatchSourcesList = [
|
||||
iconUrl: getIconUrl("kaido", "en"),
|
||||
version: aniwatchVersion,
|
||||
isManga: false,
|
||||
appMinVerReq: "0.0.45",
|
||||
sourceCodeUrl: aniwatchSourceCodeUrl),
|
||||
];
|
||||
|
||||
@@ -1,22 +1,19 @@
|
||||
import 'dart:convert';
|
||||
import 'package:bridge_lib/bridge_lib.dart';
|
||||
|
||||
getPopularAnime(MangaModel anime) async {
|
||||
getPopularAnime(MManga anime) async {
|
||||
final data = {"url": "${anime.baseUrl}/popular.html?page=${anime.page}"};
|
||||
final res = await MBridge.http('GET', json.encode(data));
|
||||
if (res.isEmpty) {
|
||||
return anime;
|
||||
}
|
||||
anime.urls = MBridge.xpath(res, '//*[@class="img"]/a/@href');
|
||||
|
||||
anime.names = MBridge.xpath(res, '//*[@class="img"]/a/@title');
|
||||
|
||||
anime.images = MBridge.xpath(res, '//*[@class="img"]/a/img/@src');
|
||||
|
||||
return anime;
|
||||
}
|
||||
|
||||
getLatestUpdatesAnime(MangaModel anime) async {
|
||||
getLatestUpdatesAnime(MManga anime) async {
|
||||
final url =
|
||||
"https://ajax.gogo-load.com/ajax/page-recent-release-ongoing.html?page=${anime.page}&type=1";
|
||||
final data = {"url": url};
|
||||
@@ -26,7 +23,6 @@ getLatestUpdatesAnime(MangaModel anime) async {
|
||||
}
|
||||
anime.urls = MBridge.xpath(
|
||||
res, '//*[@class="added_series_body popular"]/ul/li/a[1]/@href');
|
||||
|
||||
anime.names = MBridge.xpath(
|
||||
res, '//*[//*[@class="added_series_body popular"]/ul/li/a[1]/@title');
|
||||
List<String> images = [];
|
||||
@@ -41,7 +37,7 @@ getLatestUpdatesAnime(MangaModel anime) async {
|
||||
return anime;
|
||||
}
|
||||
|
||||
getAnimeDetail(MangaModel anime) async {
|
||||
getAnimeDetail(MManga anime) async {
|
||||
final statusList = [
|
||||
{
|
||||
"Ongoing": 0,
|
||||
@@ -59,12 +55,10 @@ getAnimeDetail(MangaModel anime) async {
|
||||
res, '//*[@class="anime_info_body_bg"]/p[@class="type"][5]/text()')
|
||||
.first
|
||||
.replaceAll("Status: ", "");
|
||||
|
||||
anime.description = MBridge.xpath(
|
||||
res, '//*[@class="anime_info_body_bg"]/p[@class="type"][2]/text()')
|
||||
.first
|
||||
.replaceAll("Plot Summary: ", "");
|
||||
|
||||
anime.status = MBridge.parseStatus(status, statusList);
|
||||
anime.genre = MBridge.xpath(
|
||||
res, '//*[@class="anime_info_body_bg"]/p[@class="type"][3]/text()')
|
||||
@@ -91,7 +85,7 @@ getAnimeDetail(MangaModel anime) async {
|
||||
return anime;
|
||||
}
|
||||
|
||||
getVideoList(MangaModel anime) async {
|
||||
getVideoList(MManga anime) async {
|
||||
final datas = {"url": "${anime.baseUrl}${anime.link}"};
|
||||
|
||||
final res = await MBridge.http('GET', json.encode(datas));
|
||||
@@ -104,13 +98,12 @@ getVideoList(MangaModel anime) async {
|
||||
MBridge.xpath(res, '//*[@class="anime_muti_link"]/ul/li/a/@data-video');
|
||||
final classNames =
|
||||
MBridge.xpath(res, '//*[@class="anime_muti_link"]/ul/li/@class');
|
||||
print(serverUrls);
|
||||
List<VideoModel> videos = [];
|
||||
List<MVideo> videos = [];
|
||||
for (var i = 0; i < classNames.length; i++) {
|
||||
final name = classNames[i];
|
||||
final url = serverUrls[i];
|
||||
print(url);
|
||||
List<VideoModel> a = [];
|
||||
List<MVideo> a = [];
|
||||
if (name.contains("anime")) {
|
||||
a = await MBridge.gogoCdnExtractor(url);
|
||||
} else if (name.contains("vidcdn")) {
|
||||
@@ -131,7 +124,7 @@ getVideoList(MangaModel anime) async {
|
||||
return videos;
|
||||
}
|
||||
|
||||
searchAnime(MangaModel anime) async {
|
||||
searchAnime(MManga anime) async {
|
||||
final url =
|
||||
"${anime.baseUrl}/search.html?keyword=${anime.query}&page=${anime.page}";
|
||||
final data = {"url": url};
|
||||
@@ -140,9 +133,7 @@ searchAnime(MangaModel anime) async {
|
||||
return anime;
|
||||
}
|
||||
anime.urls = MBridge.xpath(res, '//*[@class="img"]/a/@href');
|
||||
|
||||
anime.names = MBridge.xpath(res, '//*[@class="img"]/a/@title');
|
||||
|
||||
anime.images = MBridge.xpath(res, '//*[@class="img"]/a/img/@src');
|
||||
return anime;
|
||||
}
|
||||
@@ -2,7 +2,7 @@ import '../../../../model/source.dart';
|
||||
import '../../../../utils/utils.dart';
|
||||
|
||||
Source get gogoanimeSource => _gogoanimeSource;
|
||||
const gogoanimeVersion = "0.0.2";
|
||||
const gogoanimeVersion = "0.0.3";
|
||||
const gogoanimeSourceCodeUrl =
|
||||
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/main/anime/src/en/gogoanime/gogoanime-v$gogoanimeVersion.dart";
|
||||
Source _gogoanimeSource = Source(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'dart:convert';
|
||||
import 'package:bridge_lib/bridge_lib.dart';
|
||||
|
||||
getPopularAnime(MangaModel anime) async {
|
||||
getPopularAnime(MManga anime) async {
|
||||
final data = {
|
||||
"url":
|
||||
"${anime.baseUrl}/api/DramaList/List?page=${anime.page}&type=0&sub=0&country=0&status=0&order=1&pageSize=40"
|
||||
@@ -24,7 +24,7 @@ getPopularAnime(MangaModel anime) async {
|
||||
return anime;
|
||||
}
|
||||
|
||||
getLatestUpdatesAnime(MangaModel anime) async {
|
||||
getLatestUpdatesAnime(MManga anime) async {
|
||||
final data = {
|
||||
"url":
|
||||
"${anime.baseUrl}/api/DramaList/List?page=${anime.page}&type=0&sub=0&country=0&status=0&order=12&pageSize=40"
|
||||
@@ -48,7 +48,7 @@ getLatestUpdatesAnime(MangaModel anime) async {
|
||||
return anime;
|
||||
}
|
||||
|
||||
getAnimeDetail(MangaModel anime) async {
|
||||
getAnimeDetail(MManga anime) async {
|
||||
final statusList = [
|
||||
{
|
||||
"Ongoing": 0,
|
||||
@@ -72,10 +72,10 @@ getAnimeDetail(MangaModel anime) async {
|
||||
final episodesCount = jsonRes["episodesCount"] as int;
|
||||
List<String> episodesNames = [];
|
||||
List<String> episodesUrls = [];
|
||||
bool containsAnime = type.contains("Anime") as bool;
|
||||
bool containsTVSeries = type.contains("TVSeries") as bool;
|
||||
bool containsHollywood = type.contains("Hollywood") as bool;
|
||||
bool containsMovie = type.contains("Movie") as bool;
|
||||
final containsAnime = type.contains("Anime") as bool;
|
||||
final containsTVSeries = type.contains("TVSeries") as bool;
|
||||
final containsHollywood = type.contains("Hollywood") as bool;
|
||||
final containsMovie = type.contains("Movie") as bool;
|
||||
for (var a in episodes) {
|
||||
String number = (a["number"] as double).toString().replaceAll(".0", "");
|
||||
final id = a["id"];
|
||||
@@ -96,7 +96,7 @@ getAnimeDetail(MangaModel anime) async {
|
||||
return anime;
|
||||
}
|
||||
|
||||
getVideoList(MangaModel anime) async {
|
||||
getVideoList(MManga anime) async {
|
||||
final datas = {"url": anime.link};
|
||||
|
||||
final res = await MBridge.http('GET', json.encode(datas));
|
||||
@@ -111,13 +111,13 @@ getVideoList(MangaModel anime) async {
|
||||
'GET', json.encode({"url": "${anime.baseUrl}/api/Sub/$id"}));
|
||||
var jsonSubRes = json.decode(subRes);
|
||||
|
||||
List<TrackModel> subtitles = [];
|
||||
List<MTrack> subtitles = [];
|
||||
|
||||
for (var sub in jsonSubRes) {
|
||||
try {
|
||||
final subUrl = sub["src"];
|
||||
final label = sub["label"];
|
||||
TrackModel subtitle = TrackModel();
|
||||
MTrack subtitle = MTrack();
|
||||
subtitle
|
||||
..label = label
|
||||
..file = subUrl;
|
||||
@@ -126,7 +126,7 @@ getVideoList(MangaModel anime) async {
|
||||
}
|
||||
|
||||
final videoUrl = jsonRes["Video"];
|
||||
VideoModel video = VideoModel();
|
||||
MVideo video = MVideo();
|
||||
video
|
||||
..url = videoUrl
|
||||
..originalUrl = videoUrl
|
||||
@@ -139,7 +139,7 @@ getVideoList(MangaModel anime) async {
|
||||
return [video];
|
||||
}
|
||||
|
||||
searchAnime(MangaModel anime) async {
|
||||
searchAnime(MManga anime) async {
|
||||
final data = {
|
||||
"url": "${anime.baseUrl}/api/DramaList/Search?q=${anime.query}&type=0"
|
||||
};
|
||||
@@ -148,11 +148,8 @@ searchAnime(MangaModel anime) async {
|
||||
return anime;
|
||||
}
|
||||
var jsonRes = json.decode(res) as List;
|
||||
|
||||
anime.names = jsonRes.map((e) => e["title"]).toList();
|
||||
|
||||
anime.images = jsonRes.map((e) => e["thumbnail"] ?? "").toList();
|
||||
|
||||
anime.urls = jsonRes
|
||||
.map((e) => "${anime.baseUrl}/api/DramaList/Drama/${e["id"]}?isq=false")
|
||||
.toList();
|
||||
@@ -2,7 +2,7 @@ import '../../../../model/source.dart';
|
||||
import '../../../../utils/utils.dart';
|
||||
|
||||
Source get kisskhSource => _kisskhSource;
|
||||
const kisskhVersion = "0.0.1";
|
||||
const kisskhVersion = "0.0.2";
|
||||
const kisskhSourceCodeUrl =
|
||||
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/main/anime/src/en/kisskh/kisskh-v$kisskhVersion.dart";
|
||||
Source _kisskhSource = Source(
|
||||
@@ -13,5 +13,4 @@ Source _kisskhSource = Source(
|
||||
iconUrl: getIconUrl("kisskh", "en"),
|
||||
sourceCodeUrl: kisskhSourceCodeUrl,
|
||||
version: kisskhVersion,
|
||||
appMinVerReq: "0.0.48",
|
||||
isManga: false);
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
import '../../../../model/source.dart';
|
||||
import '../../../../utils/utils.dart';
|
||||
|
||||
Source get wcostreamSource => _wcostreamSource;
|
||||
const wcostreamVersion = "0.0.11";
|
||||
const wcostreamSourceCodeUrl =
|
||||
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/main/anime/src/en/wcostream/wcostream-v$wcostreamVersion.dart";
|
||||
Source _wcostreamSource = Source(
|
||||
name: "WCOStream",
|
||||
baseUrl: "https://www.wcostream.org",
|
||||
lang: "en",
|
||||
typeSource: "single",
|
||||
iconUrl: getIconUrl("wcostream", "en"),
|
||||
sourceCodeUrl: wcostreamSourceCodeUrl,
|
||||
version: wcostreamVersion,
|
||||
isManga: false,
|
||||
isFullData: false);
|
||||
@@ -1,223 +0,0 @@
|
||||
import 'dart:convert';
|
||||
import 'package:bridge_lib/bridge_lib.dart';
|
||||
|
||||
getPopularAnime(MangaModel anime) async {
|
||||
return await getLatestUpdatesAnime(anime);
|
||||
}
|
||||
|
||||
Future<MangaModel> getLatestUpdatesAnime(MangaModel anime) async {
|
||||
final data = {
|
||||
"url": anime.baseUrl,
|
||||
"headers": {"referer": "https://wcostream.org/"},
|
||||
"sourceId": anime.sourceId
|
||||
};
|
||||
final res = await MBridge.http(json.encode(data), 0);
|
||||
if (res.isEmpty) {
|
||||
return anime;
|
||||
}
|
||||
final urlss = MBridge.xpath(
|
||||
res,
|
||||
'//*[@id="content"]/div/div[contains(text(),"Recent Releases")]/div/ul/li/div[@class="img"]/a/img/@alt',
|
||||
'._')
|
||||
.split('._');
|
||||
List<String> urls = [];
|
||||
for (var url in MBridge.listParse(urlss, 0)) {
|
||||
urls.add(
|
||||
"/anime/${MBridge.regExp(url, "[^A-Za-z0-9 ]", "", 0, 0).replaceAll(" ", "-").toLowerCase()}/");
|
||||
}
|
||||
anime.urls = urls;
|
||||
final imagess = MBridge.xpath(
|
||||
res,
|
||||
'//*[@id="content"]/div/div[contains(text(),"Recent Releases")]/div/ul/li/div[@class="img"]/a/img/@src',
|
||||
'._')
|
||||
.split('._');
|
||||
List<String> images = [];
|
||||
for (var image in MBridge.listParse(imagess, 0)) {
|
||||
images.add(fixUrl(image));
|
||||
}
|
||||
anime.images = images;
|
||||
final namess = MBridge.xpath(
|
||||
res,
|
||||
'//*[@id="content"]/div/div[contains(text(),"Recent Releases")]/div/ul/li/div[@class="recent-release-episodes"]/a/text()',
|
||||
'._')
|
||||
.split('._');
|
||||
List<String> names = [];
|
||||
for (var name in MBridge.listParse(namess, 0)) {
|
||||
names.add(MBridge.subString(name, ' Episode', 0));
|
||||
}
|
||||
anime.names = names;
|
||||
anime.hasNextPage = false;
|
||||
return anime;
|
||||
}
|
||||
|
||||
String fixUrl(String url) {
|
||||
return MBridge.regExp(url, r"^(?:(?:https?:)?//|www\.)", 'https://', 0, 0);
|
||||
}
|
||||
|
||||
getAnimeDetail(MangaModel anime) async {
|
||||
final url = '${anime.baseUrl}${anime.link}';
|
||||
print(url);
|
||||
final data = {
|
||||
"url": url,
|
||||
"headers": {"referer": "https://wcostream.org/"}
|
||||
};
|
||||
final res = await MBridge.http(json.encode(data), 0);
|
||||
if (res.isEmpty) {
|
||||
return anime;
|
||||
}
|
||||
|
||||
anime.status = 5;
|
||||
anime.description = MBridge.xpath(
|
||||
res,
|
||||
'//*[@class="katcont"]/div/p[contains(text(),"Plot Summary:")]/text()',
|
||||
'')
|
||||
.replaceAll('Plot Summary: ', '');
|
||||
|
||||
anime.genre = MBridge.xpath(
|
||||
res, '//*[@id="cat-genre"]/div[@class="wcobtn"]/a/text()', '._')
|
||||
.split('._');
|
||||
|
||||
anime.urls = MBridge.xpath(
|
||||
res,
|
||||
'//*[@id="catlist-listview" and @class^="cat-listview"]/ul/li/a/@href',
|
||||
'._')
|
||||
.split('._');
|
||||
anime.names = MBridge.xpath(
|
||||
res,
|
||||
'//*[@id="catlist-listview" and @class^="cat-listview"]/ul/li/a/text()',
|
||||
'._')
|
||||
.split('._');
|
||||
anime.chaptersDateUploads = [];
|
||||
return anime;
|
||||
}
|
||||
|
||||
searchAnime(MangaModel anime) async {
|
||||
final data = {
|
||||
"url": "${anime.baseUrl}/search",
|
||||
"fields": {'catara': anime.query.replaceAll(" ", "+"), 'konuara': 'series'},
|
||||
"headers": {"Referer": "${anime.baseUrl}/"},
|
||||
"sourceId": anime.sourceId
|
||||
};
|
||||
final res = await MBridge.httpMultiparFormData(json.encode(data), 1);
|
||||
if (res.isEmpty) {
|
||||
return anime;
|
||||
}
|
||||
|
||||
anime.urls = MBridge.xpath(
|
||||
res,
|
||||
'//*[@id="blog"]/div[@class="cerceve"]/div[@class="iccerceve"]/a/@href',
|
||||
'._')
|
||||
.split('._');
|
||||
|
||||
anime.names = MBridge.xpath(
|
||||
res,
|
||||
'//*[@id="blog"]/div[@class="cerceve"]/div[@class="iccerceve"]/a/@title',
|
||||
'._')
|
||||
.split('._');
|
||||
anime.images = MBridge.xpath(
|
||||
res,
|
||||
'//*[@id="blog"]/div[@class="cerceve"]/div[@class="iccerceve"]/a/img/@src',
|
||||
'._')
|
||||
.split('._');
|
||||
anime.hasNextPage = false;
|
||||
return anime;
|
||||
}
|
||||
|
||||
getVideoList(MangaModel anime) async {
|
||||
final datas = {
|
||||
"url": anime.link,
|
||||
"headers": null,
|
||||
"sourceId": anime.sourceId
|
||||
};
|
||||
|
||||
final res = await MBridge.http(json.encode(datas), 0);
|
||||
|
||||
if (res.isEmpty) {
|
||||
return [];
|
||||
}
|
||||
final script = MBridge.xpath(
|
||||
res, '//script[contains(text(), "decodeURIComponent")]/text()', "");
|
||||
final stringList = MBridge.jsonDecodeToList(
|
||||
"[${MBridge.subString(MBridge.subString(script, '[', 2), ']', 0)}]", 0);
|
||||
final shiftNumber = MBridge.intParse(
|
||||
MBridge.subString(MBridge.subString(script, '- ', 1), ')', 0));
|
||||
|
||||
print(shiftNumber - 1);
|
||||
List<String> iframeStuff = [];
|
||||
for (var i = 0; i < stringList.length; i++) {
|
||||
final decoded = MBridge.bAse64(MBridge.listParse(stringList, 0)[i], 0);
|
||||
final intValue =
|
||||
MBridge.intParse(MBridge.regExp(decoded, r"""\D""", '', 0, 0));
|
||||
iframeStuff
|
||||
.add(MBridge.stringParse("${intValue - shiftNumber}".toString(), 1));
|
||||
}
|
||||
|
||||
final iframeUrl =
|
||||
MBridge.xpath(MBridge.listParse(iframeStuff, 6)[0], '//iframe/@src', "");
|
||||
final iframeHeaders = {
|
||||
'Accept':
|
||||
'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8',
|
||||
'Connection': 'keep-alive',
|
||||
'Host': MBridge.listParse(iframeUrl.split('/'), 0)[2],
|
||||
'Referer': '${anime.baseUrl}/',
|
||||
'Sec-Fetch-Dest': 'iframe',
|
||||
'Sec-Fetch-Mode': 'navigate',
|
||||
'Sec-Fetch-Site': 'cross-site',
|
||||
'Upgrade-Insecure-Requests': '1',
|
||||
'User-Agent':
|
||||
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36 Edg/88.0.705.63',
|
||||
};
|
||||
final datasIframe = {"url": iframeUrl, "headers": iframeHeaders};
|
||||
|
||||
final resIframe = await MBridge.http(json.encode(datasIframe), 0);
|
||||
final getVideoLinkScript = MBridge.xpath(
|
||||
resIframe, '//script[contains(text(), "getJSON")]/text()', "");
|
||||
|
||||
final getVideoLinkUrl = MBridge.subString(
|
||||
MBridge.subString(getVideoLinkScript, "getJSON(\"", 2), "\"", 0);
|
||||
final getVideoHeaders = {
|
||||
'Accept': 'application/json, text/javascript, */*; q=0.01',
|
||||
'Host': MBridge.listParse(iframeUrl.split('/'), 0)[2],
|
||||
'Referer': iframeUrl,
|
||||
'User-Agent':
|
||||
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36 Edg/88.0.705.63',
|
||||
'X-Requested-With': 'XMLHttpRequest',
|
||||
};
|
||||
final datasVideoLink = {
|
||||
"url":
|
||||
'https://${MBridge.listParse(iframeUrl.split('/'), 0)[2]}$getVideoLinkUrl',
|
||||
"headers": getVideoHeaders
|
||||
};
|
||||
|
||||
final resVideoLink = await MBridge.http(json.encode(datasVideoLink), 0);
|
||||
final server = MBridge.getMapValue(resVideoLink, "server", 0);
|
||||
final enc = MBridge.getMapValue(resVideoLink, "enc", 0);
|
||||
final hd = MBridge.getMapValue(resVideoLink, "hd", 0);
|
||||
final fhd = MBridge.getMapValue(resVideoLink, "fhd", 0);
|
||||
final videoUrl = "$server/getvid?evid=$enc";
|
||||
|
||||
final videoHeaders = {
|
||||
'Accept':
|
||||
'video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5',
|
||||
'Host': MBridge.listParse(videoUrl.split('/'), 0)[2],
|
||||
'Referer': MBridge.listParse(iframeUrl.split('/'), 0)[2],
|
||||
'User-Agent':
|
||||
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36 Edg/88.0.705.63',
|
||||
};
|
||||
List<VideoModel> videos = [];
|
||||
videos.add(MBridge.toVideo(
|
||||
videoUrl, "Video 480p", videoUrl, json.encode(videoHeaders)));
|
||||
if (hd.isEmpty) {
|
||||
} else {
|
||||
final hdVideoUrl = "$server/getvid?evid=$hd";
|
||||
videos.add(MBridge.toVideo(
|
||||
hdVideoUrl, "Video 720p", hdVideoUrl, json.encode(videoHeaders)));
|
||||
}
|
||||
if (fhd.isEmpty) {
|
||||
} else {
|
||||
final fhdVideoUrl = "$server/getvid?evid=$fhd";
|
||||
videos.add(MBridge.toVideo(
|
||||
fhdVideoUrl, "Video 1080p", fhdVideoUrl, json.encode(videoHeaders)));
|
||||
}
|
||||
return videos;
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'dart:convert';
|
||||
import 'package:bridge_lib/bridge_lib.dart';
|
||||
|
||||
getPopularAnime(MangaModel anime) async {
|
||||
getPopularAnime(MManga anime) async {
|
||||
final data = {"url": "${anime.baseUrl}/"};
|
||||
final res = await MBridge.http('GET', json.encode(data));
|
||||
if (res.isEmpty) {
|
||||
@@ -9,17 +9,15 @@ getPopularAnime(MangaModel anime) async {
|
||||
}
|
||||
anime.urls = MBridge.xpath(res,
|
||||
'//*[contains(@class,"swiper-slide item-qtip")]/div[@class="item"]/a/@href');
|
||||
|
||||
anime.names = MBridge.xpath(res,
|
||||
'//*[contains(@class,"swiper-slide item-qtip")]/div[@class="item"]/a/img/@title');
|
||||
|
||||
anime.images = MBridge.xpath(res,
|
||||
'//*[contains(@class,"swiper-slide item-qtip")]/div[@class="item"]/a/img/@data-src');
|
||||
anime.hasNextPage = false;
|
||||
return anime;
|
||||
}
|
||||
|
||||
getLatestUpdatesAnime(MangaModel anime) async {
|
||||
getLatestUpdatesAnime(MManga anime) async {
|
||||
final data = {"url": "${anime.baseUrl}/"};
|
||||
final res = await MBridge.http('GET', json.encode(data));
|
||||
if (res.isEmpty) {
|
||||
@@ -28,17 +26,15 @@ getLatestUpdatesAnime(MangaModel anime) async {
|
||||
|
||||
anime.urls = MBridge.xpath(res,
|
||||
'//*[@class="block_area block_area_home"]/div[@class="tab-content"]/div[contains(@class,"block_area-content block_area-list")]/div[@class="film_list-wrap"]/div[@class="flw-item"]/div[@class="film-poster"]/a/@href');
|
||||
|
||||
anime.names = MBridge.xpath(res,
|
||||
'//*[@class="block_area block_area_home"]/div[@class="tab-content"]/div[contains(@class,"block_area-content block_area-list")]/div[@class="film_list-wrap"]/div[@class="flw-item"]/div[@class="film-poster"]/a/@title');
|
||||
|
||||
anime.images = MBridge.xpath(res,
|
||||
'//*[@class="block_area block_area_home"]/div[@class="tab-content"]/div[contains(@class,"block_area-content block_area-list")]/div[@class="film_list-wrap"]/div[@class="flw-item"]/div[@class="film-poster"]/img/@data-src');
|
||||
anime.hasNextPage = false;
|
||||
return anime;
|
||||
}
|
||||
|
||||
searchAnime(MangaModel anime) async {
|
||||
searchAnime(MManga anime) async {
|
||||
final url =
|
||||
"${anime.baseUrl}/?story=${anime.query}&do=search&subaction=search";
|
||||
final data = {"url": url};
|
||||
@@ -47,14 +43,13 @@ searchAnime(MangaModel anime) async {
|
||||
return anime;
|
||||
}
|
||||
anime.urls = MBridge.xpath(res, '//*[@class="film-poster"]/a/@href');
|
||||
|
||||
anime.names = MBridge.xpath(res, '//*[@class="film-poster"]/a/@title');
|
||||
anime.images = MBridge.xpath(res, '//*[@class="film-poster"]/img/@data-src');
|
||||
anime.hasNextPage = false;
|
||||
return anime;
|
||||
}
|
||||
|
||||
getAnimeDetail(MangaModel anime) async {
|
||||
getAnimeDetail(MManga anime) async {
|
||||
final statusList = [
|
||||
{
|
||||
"En cours": 0,
|
||||
@@ -67,16 +62,13 @@ getAnimeDetail(MangaModel anime) async {
|
||||
if (res.isEmpty) {
|
||||
return anime;
|
||||
}
|
||||
|
||||
anime.description =
|
||||
MBridge.xpath(res, '//*[@class="film-description m-hide"]/text()').first;
|
||||
|
||||
final status = MBridge.xpath(res,
|
||||
'//*[@class="item item-title" and contains(text(),"Status:")]/span[2]/text()')
|
||||
.first;
|
||||
|
||||
anime.status = MBridge.parseStatus(status, statusList);
|
||||
|
||||
anime.genre = MBridge.xpath(res,
|
||||
'//*[@class="item item-list" and contains(text(),"Genres:")]/a/text()');
|
||||
anime.author = MBridge.xpath(res,
|
||||
@@ -88,7 +80,6 @@ getAnimeDetail(MangaModel anime) async {
|
||||
anime.urls = MBridge.xpath(resEpWebview, '//*[@class="ss-list"]/a/@href')
|
||||
.reversed
|
||||
.toList();
|
||||
|
||||
anime.names = MBridge.xpath(resEpWebview,
|
||||
'//*[@class="ss-list"]/a/div[@class="ssli-detail"]/div/text()')
|
||||
.reversed
|
||||
@@ -97,7 +88,7 @@ getAnimeDetail(MangaModel anime) async {
|
||||
return anime;
|
||||
}
|
||||
|
||||
getVideoList(MangaModel anime) async {
|
||||
getVideoList(MManga anime) async {
|
||||
final resWebview = await MBridge.getHtmlViaWebview(
|
||||
anime.link, '//*[@class="ps__-list"]/div/@data-server-id');
|
||||
|
||||
@@ -112,13 +103,12 @@ getVideoList(MangaModel anime) async {
|
||||
.first;
|
||||
serverUrls.add(serversUrls);
|
||||
}
|
||||
|
||||
List<VideoModel> videos = [];
|
||||
List<MVideo> videos = [];
|
||||
for (var i = 0; i < serverNames.length; i++) {
|
||||
final name = serverNames[i];
|
||||
final url = serverUrls[i];
|
||||
|
||||
List<VideoModel> a = [];
|
||||
List<MVideo> a = [];
|
||||
if (name.contains("Sendvid")) {
|
||||
a = await MBridge.sendVidExtractor(
|
||||
url.replaceAll("https:////", "https://"),
|
||||
@@ -2,7 +2,7 @@ import '../../../../model/source.dart';
|
||||
import '../../../../utils/utils.dart';
|
||||
|
||||
Source get animesultraSource => _animesultraSource;
|
||||
const animesultraVersion = "0.0.2";
|
||||
const animesultraVersion = "0.0.3";
|
||||
const animesultraSourceCodeUrl =
|
||||
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/main/anime/src/fr/animesultra/animesultra-v$animesultraVersion.dart";
|
||||
Source _animesultraSource = Source(
|
||||
|
||||
@@ -10,7 +10,7 @@ Future<String> dataBase(int sourceId) async {
|
||||
return res;
|
||||
}
|
||||
|
||||
getPopularAnime(MangaModel anime) async {
|
||||
getPopularAnime(MManga anime) async {
|
||||
final data = {
|
||||
"url": "https://api.franime.fr/api/animes/",
|
||||
"headers": {"Referer": "https://franime.fr/"}
|
||||
@@ -19,16 +19,16 @@ getPopularAnime(MangaModel anime) async {
|
||||
if (res.isEmpty) {
|
||||
return anime;
|
||||
}
|
||||
List<MangaModel> animeList = animeResList(res);
|
||||
List<MManga> animeList = animeResList(res);
|
||||
|
||||
return animeList;
|
||||
}
|
||||
|
||||
List<MangaModel> animeResList(String res) {
|
||||
List<MManga> animeResList(String res) {
|
||||
final statusList = [
|
||||
{"EN COURS": 0, "TERMINÉ": 1}
|
||||
];
|
||||
List<MangaModel> animeList = [];
|
||||
List<MManga> animeList = [];
|
||||
|
||||
var jsonResList = json.decode(res);
|
||||
|
||||
@@ -56,7 +56,7 @@ List<MangaModel> animeResList(String res) {
|
||||
bool hasVf = vfListName.contains(true);
|
||||
if (hasVostfr || hasVf) {
|
||||
for (int i = 0; i < seasons.length; i++) {
|
||||
MangaModel anime = MangaModel();
|
||||
MManga anime = MManga();
|
||||
int ind = i + 1;
|
||||
anime.genre = genre;
|
||||
anime.description = description;
|
||||
@@ -106,7 +106,7 @@ String databaseAnimeByTitleO(String res, String titleO) {
|
||||
return "";
|
||||
}
|
||||
|
||||
getAnimeDetail(MangaModel anime) async {
|
||||
getAnimeDetail(MManga anime) async {
|
||||
String language = "vo".toString();
|
||||
if (anime.link.contains("lang=")) {
|
||||
language = MBridge.substringBefore(
|
||||
@@ -165,7 +165,7 @@ getAnimeDetail(MangaModel anime) async {
|
||||
return anime;
|
||||
}
|
||||
|
||||
getLatestUpdatesAnime(MangaModel anime) async {
|
||||
getLatestUpdatesAnime(MManga anime) async {
|
||||
final res = await dataBase(anime.sourceId);
|
||||
|
||||
if (res.isEmpty) {
|
||||
@@ -173,29 +173,29 @@ getLatestUpdatesAnime(MangaModel anime) async {
|
||||
}
|
||||
List list = json.decode(res);
|
||||
List reversedList = list.reversed.toList();
|
||||
List<MangaModel> animeList = animeResList(json.encode(reversedList));
|
||||
List<MManga> animeList = animeResList(json.encode(reversedList));
|
||||
|
||||
return animeList;
|
||||
}
|
||||
|
||||
searchAnime(MangaModel anime) async {
|
||||
searchAnime(MManga anime) async {
|
||||
final res = await dataBase(anime.sourceId);
|
||||
|
||||
if (res.isEmpty) {
|
||||
return anime;
|
||||
}
|
||||
List<MangaModel> animeList = animeSeachFetch(res, anime.query);
|
||||
List<MManga> animeList = animeSeachFetch(res, anime.query);
|
||||
return animeList;
|
||||
}
|
||||
|
||||
List<MangaModel> animeSeachFetch(String res, query) {
|
||||
List<MManga> animeSeachFetch(String res, query) {
|
||||
final statusList = [
|
||||
{"EN COURS": 0, "TERMINÉ": 1}
|
||||
];
|
||||
List<MangaModel> animeList = [];
|
||||
List<MManga> animeList = [];
|
||||
final jsonResList = json.decode(res);
|
||||
for (var animeJson in jsonResList) {
|
||||
MangaModel anime = MangaModel();
|
||||
MManga anime = MManga();
|
||||
|
||||
final titleO = MBridge.getMapValue(json.encode(animeJson), "titleO");
|
||||
final titleAlt =
|
||||
@@ -250,7 +250,7 @@ List<MangaModel> animeSeachFetch(String res, query) {
|
||||
bool hasVf = vfListName.contains(true);
|
||||
if (hasVostfr || hasVf) {
|
||||
for (int i = 0; i < seasons.length; i++) {
|
||||
MangaModel anime = MangaModel();
|
||||
MManga anime = MManga();
|
||||
int ind = i + 1;
|
||||
anime.genre = genre;
|
||||
anime.description = description;
|
||||
@@ -287,7 +287,7 @@ List<MangaModel> animeSeachFetch(String res, query) {
|
||||
return animeList;
|
||||
}
|
||||
|
||||
getVideoList(MangaModel anime) async {
|
||||
getVideoList(MManga anime) async {
|
||||
String language = "vo".toString();
|
||||
String videoBaseUrl = "https://api.franime.fr/api/anime".toString();
|
||||
if (anime.link.contains("lang=")) {
|
||||
@@ -346,12 +346,12 @@ getVideoList(MangaModel anime) async {
|
||||
} else if (language == "vf" && hasVf) {
|
||||
players = vfPlayers;
|
||||
}
|
||||
List<VideoModel> videos = [];
|
||||
List<MVideo> videos = [];
|
||||
for (var i = 0; i < players.length; i++) {
|
||||
String apiUrl = "$videoBaseUrl/$language/$i";
|
||||
String playerName = players[i];
|
||||
|
||||
VideoModel video = VideoModel();
|
||||
MVideo video = MVideo();
|
||||
|
||||
final data = {
|
||||
"url": apiUrl,
|
||||
@@ -359,7 +359,7 @@ getVideoList(MangaModel anime) async {
|
||||
"sourceId": anime.sourceId
|
||||
};
|
||||
final playerUrl = await MBridge.http('GET', json.encode(data));
|
||||
List<VideoModel> a = [];
|
||||
List<MVideo> a = [];
|
||||
if (playerName.contains("franime_myvi")) {
|
||||
videos.add(video
|
||||
..url = playerUrl
|
||||
@@ -2,7 +2,7 @@ import '../../../../model/source.dart';
|
||||
import '../../../../utils/utils.dart';
|
||||
|
||||
Source get franimeSource => _franimeSource;
|
||||
const franimeVersion = "0.0.22";
|
||||
const franimeVersion = "0.0.3";
|
||||
const franimeSourceCodeUrl =
|
||||
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/main/anime/src/fr/franime/franime-v$franimeVersion.dart";
|
||||
Source _franimeSource = Source(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'dart:convert';
|
||||
import 'package:bridge_lib/bridge_lib.dart';
|
||||
|
||||
getPopularAnime(MangaModel anime) async {
|
||||
getPopularAnime(MManga anime) async {
|
||||
final data = {
|
||||
"url": "${anime.baseUrl}/toute-la-liste-affiches/page/${anime.page}/?q=."
|
||||
};
|
||||
@@ -9,10 +9,8 @@ getPopularAnime(MangaModel anime) async {
|
||||
if (res.isEmpty) {
|
||||
return anime;
|
||||
}
|
||||
|
||||
anime.urls =
|
||||
MBridge.xpath(res, '//*[@class="list"]/article/div/div/figure/a/@href');
|
||||
|
||||
anime.names = MBridge.xpath(
|
||||
res, '//*[@class="list"]/article/div/div/figure/a/img/@title');
|
||||
anime.images = MBridge.xpath(
|
||||
@@ -26,13 +24,12 @@ getPopularAnime(MangaModel anime) async {
|
||||
return anime;
|
||||
}
|
||||
|
||||
getLatestUpdatesAnime(MangaModel anime) async {
|
||||
getLatestUpdatesAnime(MManga anime) async {
|
||||
final data = {"url": "${anime.baseUrl}/page/${anime.page}/"};
|
||||
final res = await MBridge.http('GET', json.encode(data));
|
||||
if (res.isEmpty) {
|
||||
return anime;
|
||||
}
|
||||
|
||||
anime.urls = MBridge.xpath(res, '//*[@class="episode"]/div/a/@href');
|
||||
final namess = MBridge.xpath(res, '//*[@class="episode"]/div/a/text()');
|
||||
List<String> names = [];
|
||||
@@ -66,7 +63,7 @@ getLatestUpdatesAnime(MangaModel anime) async {
|
||||
return anime;
|
||||
}
|
||||
|
||||
getAnimeDetail(MangaModel anime) async {
|
||||
getAnimeDetail(MManga anime) async {
|
||||
final statusList = [
|
||||
{
|
||||
"En cours": 0,
|
||||
@@ -122,7 +119,7 @@ getAnimeDetail(MangaModel anime) async {
|
||||
return anime;
|
||||
}
|
||||
|
||||
searchAnime(MangaModel anime) async {
|
||||
searchAnime(MManga anime) async {
|
||||
final data = {
|
||||
"url":
|
||||
"${anime.baseUrl}/toute-la-liste-affiches/page/${anime.page}/?q=${anime.query}"
|
||||
@@ -148,7 +145,7 @@ searchAnime(MangaModel anime) async {
|
||||
return anime;
|
||||
}
|
||||
|
||||
getVideoList(MangaModel anime) async {
|
||||
getVideoList(MManga anime) async {
|
||||
final datas = {"url": anime.link};
|
||||
|
||||
final res = await MBridge.http('GET', json.encode(datas));
|
||||
@@ -158,7 +155,7 @@ getVideoList(MangaModel anime) async {
|
||||
}
|
||||
final servers =
|
||||
MBridge.xpath(res, '//*[@id="nav-tabContent"]/div/iframe/@src');
|
||||
List<VideoModel> videos = [];
|
||||
List<MVideo> videos = [];
|
||||
for (var url in servers) {
|
||||
final datasServer = {
|
||||
"url": fixUrl(url),
|
||||
@@ -168,7 +165,7 @@ getVideoList(MangaModel anime) async {
|
||||
final resServer = await MBridge.http('GET', json.encode(datasServer));
|
||||
final serverUrl =
|
||||
fixUrl(MBridge.regExp(resServer, r"data-url='([^']+)'", '', 1, 1));
|
||||
List<VideoModel> a = [];
|
||||
List<MVideo> a = [];
|
||||
if (serverUrl.contains("https://streamwish")) {
|
||||
a = await MBridge.streamWishExtractor(serverUrl, "StreamWish");
|
||||
} else if (serverUrl.contains("sibnet")) {
|
||||
@@ -2,7 +2,7 @@ import '../../../../model/source.dart';
|
||||
import '../../../../utils/utils.dart';
|
||||
|
||||
Source get otakufr => _otakufr;
|
||||
const otakufrVersion = "0.0.2";
|
||||
const otakufrVersion = "0.0.3";
|
||||
const otakufrCodeUrl =
|
||||
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/main/anime/src/fr/otakufr/otakufr-v$otakufrVersion.dart";
|
||||
Source _otakufr = Source(
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
import '../../../../model/source.dart';
|
||||
import '../../../../utils/utils.dart';
|
||||
|
||||
Source get universanimeSource => _universanimeSource;
|
||||
const universanimeVersion = "0.0.2";
|
||||
const universanimeSourceCodeUrl =
|
||||
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/main/anime/src/fr/universanime/universanime-v$universanimeVersion.dart";
|
||||
Source _universanimeSource = Source(
|
||||
name: "UniversAnime",
|
||||
baseUrl: "https://www.universanime.club",
|
||||
lang: "fr",
|
||||
typeSource: "single",
|
||||
iconUrl: getIconUrl("universanime", "fr"),
|
||||
sourceCodeUrl: universanimeSourceCodeUrl,
|
||||
version: universanimeVersion,
|
||||
isManga: false,
|
||||
isFullData: true);
|
||||
@@ -1,125 +0,0 @@
|
||||
import 'dart:convert';
|
||||
import 'package:bridge_lib/bridge_lib.dart';
|
||||
|
||||
getVideoList(MangaModel anime) async {
|
||||
final datas = {"url": anime.link};
|
||||
|
||||
final res = await MBridge.http('GET', json.encode(datas));
|
||||
|
||||
if (res.isEmpty) {
|
||||
return [];
|
||||
}
|
||||
|
||||
final serverUrls =
|
||||
MBridge.xpath(res, '//*[@class="entry-content"]/div/div/iframe/@src');
|
||||
List<VideoModel> videos = [];
|
||||
for (var i = 0; i < serverUrls.length; i++) {
|
||||
final url = serverUrls[i];
|
||||
print(url);
|
||||
List<VideoModel> a = [];
|
||||
if (url.startsWith("https://filemoon.")) {
|
||||
a = await MBridge.filemoonExtractor(url, "");
|
||||
} else if (url.startsWith("https://doodstream.")) {
|
||||
a = await MBridge.doodExtractor(url);
|
||||
} else if (url.startsWith("https://streamtape.")) {
|
||||
a = await MBridge.streamTapeExtractor(url);
|
||||
} else if (url.contains("streamsb")) {}
|
||||
for (var vi in a) {
|
||||
videos.add(vi);
|
||||
}
|
||||
}
|
||||
|
||||
return videos;
|
||||
}
|
||||
|
||||
Future<MangaModel> getLatestUpdatesAnime(MangaModel anime) async {
|
||||
final data = {"url": "${anime.baseUrl}/page/${anime.page}/"};
|
||||
final res = await MBridge.http('GET', json.encode(data));
|
||||
if (res.isEmpty) {
|
||||
return anime;
|
||||
}
|
||||
anime.urls = MBridge.xpath(
|
||||
res, '//*[@class="recent-posts"]/li/div[@class="post-thumb"]/a/@href');
|
||||
anime.names = MBridge.xpath(
|
||||
res, '//*[@class="recent-posts"]/li/div[@class="post-thumb"]/a/@title');
|
||||
anime.images = [];
|
||||
return anime;
|
||||
}
|
||||
|
||||
getAnimeDetail(MangaModel anime) async {
|
||||
final url = anime.link;
|
||||
final data = {"url": url};
|
||||
final res = await MBridge.http('GET', json.encode(data));
|
||||
if (res.isEmpty) {
|
||||
return anime;
|
||||
}
|
||||
anime.description = MBridge.xpath(res,
|
||||
'//*[@class="entry-content"]/p[contains(text(),"Synopsis")]/text()')
|
||||
.first;
|
||||
|
||||
anime.status = 5;
|
||||
|
||||
final urls = MBridge.xpath(res,
|
||||
'//*[@class="entry-content"]/ul[@class="lcp_catlist" and contains(@id,"lcp_instance_")]/li/a/@href');
|
||||
final names = MBridge.xpath(res,
|
||||
'//*[@class="entry-content"]/ul[@class="lcp_catlist" and contains(@id,"lcp_instance_")]/li/a/text()');
|
||||
if (urls.isEmpty && names.isEmpty) {
|
||||
anime.urls = [anime.link];
|
||||
anime.names = ["Film"];
|
||||
} else {
|
||||
anime.urls = urls;
|
||||
anime.names = names;
|
||||
}
|
||||
|
||||
anime.chaptersDateUploads = [];
|
||||
return anime;
|
||||
}
|
||||
|
||||
getPopularAnime(MangaModel anime) async {
|
||||
return await getLatestUpdatesAnime(anime);
|
||||
}
|
||||
|
||||
searchAnime(MangaModel anime) async {
|
||||
final data = {"url": "${anime.baseUrl}/liste-des-animes-2/"};
|
||||
final res = await MBridge.http('GET', json.encode(data));
|
||||
if (res.isEmpty) {
|
||||
return anime;
|
||||
}
|
||||
|
||||
final dataMovies = {"url": "${anime.baseUrl}/films-mangas/"};
|
||||
final resMovies = await MBridge.http('GET', json.encode(dataMovies));
|
||||
List<String> urlsS = [];
|
||||
List<String> namesS = [];
|
||||
final urls = MBridge.xpath(res,
|
||||
'//*[@class="lcp_catlist" and contains(@id,"lcp_instance_")]/li/a/@href');
|
||||
|
||||
final names = MBridge.xpath(res,
|
||||
'//*[@class="lcp_catlist" and contains(@id,"lcp_instance_")]/li/a/text()');
|
||||
final urlsMovies = MBridge.xpath(resMovies,
|
||||
'//*[@class="recent-posts"]/li/div[@class="post-thumb"]/a/@href');
|
||||
|
||||
final namesMovies = MBridge.xpath(resMovies,
|
||||
'//*[@class="recent-posts"]/li/div[@class="post-thumb"]/a/@title');
|
||||
for (var i = 0; i < names.length; i++) {
|
||||
final name = names[i];
|
||||
if (name.toLowerCase().contains(anime.query)) {
|
||||
final url = urls[i];
|
||||
urlsS.add(url);
|
||||
namesS.add(name);
|
||||
}
|
||||
}
|
||||
for (var i = 0; i < namesMovies.length; i++) {
|
||||
final name = namesMovies[i];
|
||||
if (name.toLowerCase().contains(anime.query)) {
|
||||
final url = urlsMovies[i];
|
||||
urlsS.add(url);
|
||||
namesS.add(name);
|
||||
}
|
||||
}
|
||||
anime.urls = urlsS;
|
||||
|
||||
anime.names = namesS;
|
||||
anime.images = [];
|
||||
|
||||
return anime;
|
||||
}
|
||||
Reference in New Issue
Block a user