mirror of
https://github.com/kodjodevf/mangayomi-extensions.git
synced 2026-02-14 10:51:17 +00:00
Add New sources: BeastScan (AR), Lelmanga (FR) & remove unused code
This commit is contained in:
@@ -22,9 +22,7 @@ class ZoroTheme extends MProvider {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Future<MPages> search(MSource source, String query, int page) async {
|
Future<MPages> search(MSource source, String query, int page) async {
|
||||||
final data = {
|
final data = {"url": "${source.baseUrl}/search?keyword=$query&page=$page"};
|
||||||
"url": "${source.baseUrl}/search?keyword=$query&page=$page"
|
|
||||||
};
|
|
||||||
final res = await http('GET', json.encode(data));
|
final res = await http('GET', json.encode(data));
|
||||||
|
|
||||||
return animeElementM(res);
|
return animeElementM(res);
|
||||||
@@ -150,8 +148,7 @@ class ZoroTheme extends MProvider {
|
|||||||
};
|
};
|
||||||
|
|
||||||
final resE = await http('GET', json.encode(datasE));
|
final resE = await http('GET', json.encode(datasE));
|
||||||
String epUrl = substringBefore(
|
String epUrl = substringBefore(substringAfter(resE, "\"link\":\""), "\"");
|
||||||
substringAfter(resE, "\"link\":\""), "\"");
|
|
||||||
print(epUrl);
|
print(epUrl);
|
||||||
List<MVideo> a = [];
|
List<MVideo> a = [];
|
||||||
if (name.contains("Vidstreaming")) {
|
if (name.contains("Vidstreaming")) {
|
||||||
@@ -167,11 +164,6 @@ class ZoroTheme extends MProvider {
|
|||||||
return videos;
|
return videos;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
Future<List<String>> getPageList(MSource source, String url) async {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
|
|
||||||
MPages animeElementM(String res) {
|
MPages animeElementM(String res) {
|
||||||
List<MManga> animeList = [];
|
List<MManga> animeList = [];
|
||||||
|
|
||||||
@@ -190,8 +182,8 @@ class ZoroTheme extends MProvider {
|
|||||||
anime.link = urls[i];
|
anime.link = urls[i];
|
||||||
animeList.add(anime);
|
animeList.add(anime);
|
||||||
}
|
}
|
||||||
final nextPage = xpath(
|
final nextPage =
|
||||||
res, '//li[@class="page-item"]/a[@title="Next"]/@href', "");
|
xpath(res, '//li[@class="page-item"]/a[@title="Next"]/@href', "");
|
||||||
return MPages(animeList, !nextPage.isEmpty);
|
return MPages(animeList, !nextPage.isEmpty);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -206,4 +198,3 @@ class ZoroTheme extends MProvider {
|
|||||||
ZoroTheme main() {
|
ZoroTheme main() {
|
||||||
return ZoroTheme();
|
return ZoroTheme();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -94,11 +94,9 @@ class OkAnime extends MProvider {
|
|||||||
if (status.isNotEmpty) {
|
if (status.isNotEmpty) {
|
||||||
anime.status = parseStatus(status.first, statusList);
|
anime.status = parseStatus(status.first, statusList);
|
||||||
}
|
}
|
||||||
anime.description =
|
anime.description = xpath(res, '//*[@class="review-content"]/text()').first;
|
||||||
xpath(res, '//*[@class="review-content"]/text()').first;
|
|
||||||
|
|
||||||
anime.genre =
|
anime.genre = xpath(res, '//*[@class="review-author-info"]/a/text()');
|
||||||
xpath(res, '//*[@class="review-author-info"]/a/text()');
|
|
||||||
final epUrls = xpath(res,
|
final epUrls = xpath(res,
|
||||||
'//*[contains(@class,"anime-card")]/div[@class="anime-title")]/h5/a/@href')
|
'//*[contains(@class,"anime-card")]/div[@class="anime-title")]/h5/a/@href')
|
||||||
.reversed
|
.reversed
|
||||||
@@ -125,8 +123,7 @@ class OkAnime extends MProvider {
|
|||||||
final res = await http('GET', json.encode({"url": url}));
|
final res = await http('GET', json.encode({"url": url}));
|
||||||
|
|
||||||
final urls = xpath(res, '//*[@id="streamlinks"]/a/@data-src');
|
final urls = xpath(res, '//*[@id="streamlinks"]/a/@data-src');
|
||||||
final qualities =
|
final qualities = xpath(res, '//*[@id="streamlinks"]/a/span/text()');
|
||||||
xpath(res, '//*[@id="streamlinks"]/a/span/text()');
|
|
||||||
|
|
||||||
List<MVideo> videos = [];
|
List<MVideo> videos = [];
|
||||||
for (var i = 0; i < urls.length; i++) {
|
for (var i = 0; i < urls.length; i++) {
|
||||||
@@ -172,11 +169,6 @@ class OkAnime extends MProvider {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
Future<List<String>> getPageList(MSource source, String url) async {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
OkAnime main() {
|
OkAnime main() {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ class GogoAnime extends MProvider {
|
|||||||
final res = await http('GET', json.encode(data));
|
final res = await http('GET', json.encode(data));
|
||||||
|
|
||||||
List<MManga> animeList = [];
|
List<MManga> animeList = [];
|
||||||
final urls = xpath(
|
final urls =
|
||||||
res, '//*[@class="added_series_body popular"]/ul/li/a[1]/@href');
|
xpath(res, '//*[@class="added_series_body popular"]/ul/li/a[1]/@href');
|
||||||
final names = xpath(
|
final names = xpath(
|
||||||
res, '//*[//*[@class="added_series_body popular"]/ul/li/a[1]/@title');
|
res, '//*[//*[@class="added_series_body popular"]/ul/li/a[1]/@title');
|
||||||
List<String> images = [];
|
List<String> images = [];
|
||||||
@@ -111,8 +111,7 @@ class GogoAnime extends MProvider {
|
|||||||
final dataEp = {"url": urlEp};
|
final dataEp = {"url": urlEp};
|
||||||
final resEp = await http('GET', json.encode(dataEp));
|
final resEp = await http('GET', json.encode(dataEp));
|
||||||
|
|
||||||
final epUrls =
|
final epUrls = xpath(resEp, '//*[@id="episode_related"]/li/a/@href');
|
||||||
xpath(resEp, '//*[@id="episode_related"]/li/a/@href');
|
|
||||||
final names = xpath(
|
final names = xpath(
|
||||||
resEp, '//*[@id="episode_related"]/li/a/div[@class="name"]/text()');
|
resEp, '//*[@id="episode_related"]/li/a/div[@class="name"]/text()');
|
||||||
List<String> episodes = [];
|
List<String> episodes = [];
|
||||||
@@ -139,8 +138,7 @@ class GogoAnime extends MProvider {
|
|||||||
final res = await http('GET', json.encode(datas));
|
final res = await http('GET', json.encode(datas));
|
||||||
final serverUrls =
|
final serverUrls =
|
||||||
xpath(res, '//*[@class="anime_muti_link"]/ul/li/a/@data-video');
|
xpath(res, '//*[@class="anime_muti_link"]/ul/li/a/@data-video');
|
||||||
final classNames =
|
final classNames = xpath(res, '//*[@class="anime_muti_link"]/ul/li/@class');
|
||||||
xpath(res, '//*[@class="anime_muti_link"]/ul/li/@class');
|
|
||||||
List<MVideo> videos = [];
|
List<MVideo> videos = [];
|
||||||
for (var i = 0; i < classNames.length; i++) {
|
for (var i = 0; i < classNames.length; i++) {
|
||||||
final name = classNames[i];
|
final name = classNames[i];
|
||||||
@@ -160,11 +158,6 @@ class GogoAnime extends MProvider {
|
|||||||
|
|
||||||
return videos;
|
return videos;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
Future<List<String>> getPageList(MSource source, String url) async {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GogoAnime main() {
|
GogoAnime main() {
|
||||||
|
|||||||
@@ -126,8 +126,7 @@ class KissKh extends MProvider {
|
|||||||
final datas = {"url": url};
|
final datas = {"url": url};
|
||||||
|
|
||||||
final res = await http('GET', json.encode(datas));
|
final res = await http('GET', json.encode(datas));
|
||||||
final id = substringAfter(
|
final id = substringAfter(substringBefore(url, ".png"), "Episode/");
|
||||||
substringBefore(url, ".png"), "Episode/");
|
|
||||||
final jsonRes = json.decode(res);
|
final jsonRes = json.decode(res);
|
||||||
|
|
||||||
final subRes = await http(
|
final subRes = await http(
|
||||||
@@ -160,11 +159,6 @@ class KissKh extends MProvider {
|
|||||||
};
|
};
|
||||||
return [video];
|
return [video];
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
Future<List<String>> getPageList(MSource source, String url) async {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
KissKh main() {
|
KissKh main() {
|
||||||
|
|||||||
@@ -60,8 +60,7 @@ class AnimesUltra extends MProvider {
|
|||||||
List<MManga> animeList = [];
|
List<MManga> animeList = [];
|
||||||
final urls = xpath(res, '//*[@class="film-poster"]/a/@href');
|
final urls = xpath(res, '//*[@class="film-poster"]/a/@href');
|
||||||
final names = xpath(res, '//*[@class="film-poster"]/a/@title');
|
final names = xpath(res, '//*[@class="film-poster"]/a/@title');
|
||||||
final images =
|
final images = xpath(res, '//*[@class="film-poster"]/img/@data-src');
|
||||||
xpath(res, '//*[@class="film-poster"]/img/@data-src');
|
|
||||||
|
|
||||||
for (var i = 0; i < names.length; i++) {
|
for (var i = 0; i < names.length; i++) {
|
||||||
MManga anime = MManga();
|
MManga anime = MManga();
|
||||||
@@ -86,8 +85,7 @@ class AnimesUltra extends MProvider {
|
|||||||
final res = await http('GET', json.encode(data));
|
final res = await http('GET', json.encode(data));
|
||||||
MManga anime = MManga();
|
MManga anime = MManga();
|
||||||
anime.description =
|
anime.description =
|
||||||
xpath(res, '//*[@class="film-description m-hide"]/text()')
|
xpath(res, '//*[@class="film-description m-hide"]/text()').first;
|
||||||
.first;
|
|
||||||
|
|
||||||
final status = xpath(res,
|
final status = xpath(res,
|
||||||
'//*[@class="item item-title" and contains(text(),"Status:")]/span[2]/text()')
|
'//*[@class="item item-title" and contains(text(),"Status:")]/span[2]/text()')
|
||||||
@@ -101,9 +99,8 @@ class AnimesUltra extends MProvider {
|
|||||||
final urlEp = url.replaceAll('.html', '/episode-1.html');
|
final urlEp = url.replaceAll('.html', '/episode-1.html');
|
||||||
final resEpWebview =
|
final resEpWebview =
|
||||||
await getHtmlViaWebview(urlEp, '//*[@class="ss-list"]/a/@href');
|
await getHtmlViaWebview(urlEp, '//*[@class="ss-list"]/a/@href');
|
||||||
final epUrls = xpath(resEpWebview, '//*[@class="ss-list"]/a/@href')
|
final epUrls =
|
||||||
.reversed
|
xpath(resEpWebview, '//*[@class="ss-list"]/a/@href').reversed.toList();
|
||||||
.toList();
|
|
||||||
final names = xpath(resEpWebview,
|
final names = xpath(resEpWebview,
|
||||||
'//*[@class="ss-list"]/a/div[@class="ssli-detail"]/div/text()')
|
'//*[@class="ss-list"]/a/div[@class="ssli-detail"]/div/text()')
|
||||||
.reversed
|
.reversed
|
||||||
@@ -126,15 +123,14 @@ class AnimesUltra extends MProvider {
|
|||||||
final resWebview = await getHtmlViaWebview(
|
final resWebview = await getHtmlViaWebview(
|
||||||
url, '//*[@class="ps__-list"]/div/@data-server-id');
|
url, '//*[@class="ps__-list"]/div/@data-server-id');
|
||||||
|
|
||||||
final serverIds = xpath(
|
final serverIds =
|
||||||
resWebview, '//*[@class="ps__-list"]/div/@data-server-id');
|
xpath(resWebview, '//*[@class="ps__-list"]/div/@data-server-id');
|
||||||
final serverNames =
|
final serverNames =
|
||||||
xpath(resWebview, '//*[@class="ps__-list"]/div/a/text()');
|
xpath(resWebview, '//*[@class="ps__-list"]/div/a/text()');
|
||||||
List<String> serverUrls = [];
|
List<String> serverUrls = [];
|
||||||
for (var id in serverIds) {
|
for (var id in serverIds) {
|
||||||
final serversUrls =
|
final serversUrls =
|
||||||
xpath(resWebview, '//*[@id="content_player_${id}"]/text()')
|
xpath(resWebview, '//*[@id="content_player_${id}"]/text()').first;
|
||||||
.first;
|
|
||||||
serverUrls.add(serversUrls);
|
serverUrls.add(serversUrls);
|
||||||
}
|
}
|
||||||
List<MVideo> videos = [];
|
List<MVideo> videos = [];
|
||||||
@@ -144,10 +140,8 @@ class AnimesUltra extends MProvider {
|
|||||||
|
|
||||||
List<MVideo> a = [];
|
List<MVideo> a = [];
|
||||||
if (name.contains("Sendvid")) {
|
if (name.contains("Sendvid")) {
|
||||||
a = await sendVidExtractor(
|
a = await sendVidExtractor(url.replaceAll("https:////", "https://"),
|
||||||
url.replaceAll("https:////", "https://"),
|
json.encode({"Referer": "${source.baseUrl}/"}), "");
|
||||||
json.encode({"Referer": "${source.baseUrl}/"}),
|
|
||||||
"");
|
|
||||||
} else if (name.contains("Sibnet")) {
|
} else if (name.contains("Sibnet")) {
|
||||||
a = await sibnetExtractor(
|
a = await sibnetExtractor(
|
||||||
"https://video.sibnet.ru/shell.php?videoid=$url");
|
"https://video.sibnet.ru/shell.php?videoid=$url");
|
||||||
@@ -159,11 +153,6 @@ class AnimesUltra extends MProvider {
|
|||||||
|
|
||||||
return videos;
|
return videos;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
Future<List<String>> getPageList(MSource source, String url) async {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AnimesUltra main() {
|
AnimesUltra main() {
|
||||||
|
|||||||
@@ -168,11 +168,6 @@ class FrAnime extends MProvider {
|
|||||||
return videos;
|
return videos;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
Future<List<String>> getPageList(MSource source, String url) async {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
|
|
||||||
MPages animeResList(String res) {
|
MPages animeResList(String res) {
|
||||||
final statusList = [
|
final statusList = [
|
||||||
{"EN COURS": 0, "TERMINÉ": 1}
|
{"EN COURS": 0, "TERMINÉ": 1}
|
||||||
|
|||||||
@@ -14,10 +14,10 @@ class OtakuFr extends MProvider {
|
|||||||
List<MManga> animeList = [];
|
List<MManga> animeList = [];
|
||||||
final urls =
|
final urls =
|
||||||
xpath(res, '//*[@class="list"]/article/div/div/figure/a/@href');
|
xpath(res, '//*[@class="list"]/article/div/div/figure/a/@href');
|
||||||
final names = xpath(
|
final names =
|
||||||
res, '//*[@class="list"]/article/div/div/figure/a/img/@title');
|
xpath(res, '//*[@class="list"]/article/div/div/figure/a/img/@title');
|
||||||
final images = xpath(
|
final images =
|
||||||
res, '//*[@class="list"]/article/div/div/figure/a/img/@src');
|
xpath(res, '//*[@class="list"]/article/div/div/figure/a/img/@src');
|
||||||
|
|
||||||
for (var i = 0; i < names.length; i++) {
|
for (var i = 0; i < names.length; i++) {
|
||||||
MManga anime = MManga();
|
MManga anime = MManga();
|
||||||
@@ -57,8 +57,7 @@ class OtakuFr extends MProvider {
|
|||||||
.replaceAll(' (Vf)', '')
|
.replaceAll(' (Vf)', '')
|
||||||
.replaceAll(' (Vostfr)', ''));
|
.replaceAll(' (Vostfr)', ''));
|
||||||
}
|
}
|
||||||
final images =
|
final images = xpath(res, '//*[@class="episode"]/div/figure/a/img/@src');
|
||||||
xpath(res, '//*[@class="episode"]/div/figure/a/img/@src');
|
|
||||||
|
|
||||||
for (var i = 0; i < names.length; i++) {
|
for (var i = 0; i < names.length; i++) {
|
||||||
MManga anime = MManga();
|
MManga anime = MManga();
|
||||||
@@ -74,18 +73,17 @@ class OtakuFr extends MProvider {
|
|||||||
@override
|
@override
|
||||||
Future<MPages> search(MSource source, String query, int page) async {
|
Future<MPages> search(MSource source, String query, int page) async {
|
||||||
final data = {
|
final data = {
|
||||||
"url":
|
"url": "${source.baseUrl}/toute-la-liste-affiches/page/$page/?q=$query"
|
||||||
"${source.baseUrl}/toute-la-liste-affiches/page/$page/?q=$query"
|
|
||||||
};
|
};
|
||||||
final res = await http('GET', json.encode(data));
|
final res = await http('GET', json.encode(data));
|
||||||
|
|
||||||
List<MManga> animeList = [];
|
List<MManga> animeList = [];
|
||||||
final urls =
|
final urls =
|
||||||
xpath(res, '//*[@class="list"]/article/div/div/figure/a/@href');
|
xpath(res, '//*[@class="list"]/article/div/div/figure/a/@href');
|
||||||
final names = xpath(
|
final names =
|
||||||
res, '//*[@class="list"]/article/div/div/figure/a/img/@title');
|
xpath(res, '//*[@class="list"]/article/div/div/figure/a/img/@title');
|
||||||
final images = xpath(
|
final images =
|
||||||
res, '//*[@class="list"]/article/div/div/figure/a/img/@src');
|
xpath(res, '//*[@class="list"]/article/div/div/figure/a/img/@src');
|
||||||
|
|
||||||
for (var i = 0; i < names.length; i++) {
|
for (var i = 0; i < names.length; i++) {
|
||||||
MManga anime = MManga();
|
MManga anime = MManga();
|
||||||
@@ -117,8 +115,7 @@ class OtakuFr extends MProvider {
|
|||||||
res = await http('GET', json.encode(newData));
|
res = await http('GET', json.encode(newData));
|
||||||
}
|
}
|
||||||
|
|
||||||
anime.description =
|
anime.description = xpath(res, '//*[@class="episode fz-sm synop"]/p/text()')
|
||||||
xpath(res, '//*[@class="episode fz-sm synop"]/p/text()')
|
|
||||||
.first
|
.first
|
||||||
.replaceAll("Synopsis:", "");
|
.replaceAll("Synopsis:", "");
|
||||||
final status = xpath(res,
|
final status = xpath(res,
|
||||||
@@ -129,12 +126,10 @@ class OtakuFr extends MProvider {
|
|||||||
anime.genre = xpath(res,
|
anime.genre = xpath(res,
|
||||||
'//*[@class="list-unstyled"]/li[contains(text(),"Genre")]/ul/li/a/text()');
|
'//*[@class="list-unstyled"]/li[contains(text(),"Genre")]/ul/li/a/text()');
|
||||||
|
|
||||||
final epUrls =
|
final epUrls = xpath(res, '//*[@class="list-episodes list-group"]/a/@href');
|
||||||
xpath(res, '//*[@class="list-episodes list-group"]/a/@href');
|
final dates =
|
||||||
final dates = xpath(
|
xpath(res, '//*[@class="list-episodes list-group"]/a/span/text()');
|
||||||
res, '//*[@class="list-episodes list-group"]/a/span/text()');
|
final names = xpath(res, '//*[@class="list-episodes list-group"]/a/text()');
|
||||||
final names =
|
|
||||||
xpath(res, '//*[@class="list-episodes list-group"]/a/text()');
|
|
||||||
List<String> episodes = [];
|
List<String> episodes = [];
|
||||||
|
|
||||||
for (var i = 0; i < names.length; i++) {
|
for (var i = 0; i < names.length; i++) {
|
||||||
@@ -162,8 +157,7 @@ class OtakuFr extends MProvider {
|
|||||||
Future<List<MVideo>> getVideoList(MSource source, String url) async {
|
Future<List<MVideo>> getVideoList(MSource source, String url) async {
|
||||||
final res = await http('GET', json.encode({"url": url}));
|
final res = await http('GET', json.encode({"url": url}));
|
||||||
|
|
||||||
final servers =
|
final servers = xpath(res, '//*[@id="nav-tabContent"]/div/iframe/@src');
|
||||||
xpath(res, '//*[@id="nav-tabContent"]/div/iframe/@src');
|
|
||||||
List<MVideo> videos = [];
|
List<MVideo> videos = [];
|
||||||
for (var url in servers) {
|
for (var url in servers) {
|
||||||
final datasServer = {
|
final datasServer = {
|
||||||
@@ -195,11 +189,6 @@ class OtakuFr extends MProvider {
|
|||||||
String fixUrl(String url) {
|
String fixUrl(String url) {
|
||||||
return regExp(url, r"^(?:(?:https?:)?//|www\.)", 'https://', 0, 0);
|
return regExp(url, r"^(?:(?:https?:)?//|www\.)", 'https://', 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
Future<List<String>> getPageList(MSource source, String url) async {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
OtakuFr main() {
|
OtakuFr main() {
|
||||||
|
|||||||
BIN
icons/mangayomi-ar-beastscans.png
Normal file
BIN
icons/mangayomi-ar-beastscans.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.6 KiB |
BIN
icons/mangayomi-fr-lelmanga.png
Normal file
BIN
icons/mangayomi-fr-lelmanga.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.0 KiB |
File diff suppressed because one or more lines are too long
@@ -224,11 +224,6 @@ class HeanCms extends MProvider {
|
|||||||
List<String> sources = ["YugenMangas", "Reaper Scans", "Perf Scan"];
|
List<String> sources = ["YugenMangas", "Reaper Scans", "Perf Scan"];
|
||||||
return sources.contains(sourceName);
|
return sources.contains(sourceName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
Future<List<MVideo>> getVideoList(MSource source, String url) async {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, String> getHeader(String url) {
|
Map<String, String> getHeader(String url) {
|
||||||
|
|||||||
@@ -15,8 +15,7 @@ class Madara extends MProvider {
|
|||||||
final names = xpath(res, '//*[@id^="manga-item"]/a/@title');
|
final names = xpath(res, '//*[@id^="manga-item"]/a/@title');
|
||||||
var images = xpath(res, '//*[@id^="manga-item"]/a/img/@data-src');
|
var images = xpath(res, '//*[@id^="manga-item"]/a/img/@data-src');
|
||||||
if (images.isEmpty) {
|
if (images.isEmpty) {
|
||||||
images =
|
images = xpath(res, '//*[@id^="manga-item"]/a/img/@data-lazy-src');
|
||||||
xpath(res, '//*[@id^="manga-item"]/a/img/@data-lazy-src');
|
|
||||||
if (images.isEmpty) {
|
if (images.isEmpty) {
|
||||||
images = xpath(res, '//*[@id^="manga-item"]/a/img/@srcset');
|
images = xpath(res, '//*[@id^="manga-item"]/a/img/@srcset');
|
||||||
if (images.isEmpty) {
|
if (images.isEmpty) {
|
||||||
@@ -47,8 +46,7 @@ class Madara extends MProvider {
|
|||||||
final names = xpath(res, '//*[@id^="manga-item"]/a/@title');
|
final names = xpath(res, '//*[@id^="manga-item"]/a/@title');
|
||||||
var images = xpath(res, '//*[@id^="manga-item"]/a/img/@data-src');
|
var images = xpath(res, '//*[@id^="manga-item"]/a/img/@data-src');
|
||||||
if (images.isEmpty) {
|
if (images.isEmpty) {
|
||||||
images =
|
images = xpath(res, '//*[@id^="manga-item"]/a/img/@data-lazy-src');
|
||||||
xpath(res, '//*[@id^="manga-item"]/a/img/@data-lazy-src');
|
|
||||||
if (images.isEmpty) {
|
if (images.isEmpty) {
|
||||||
images = xpath(res, '//*[@id^="manga-item"]/a/img/@srcset');
|
images = xpath(res, '//*[@id^="manga-item"]/a/img/@srcset');
|
||||||
if (images.isEmpty) {
|
if (images.isEmpty) {
|
||||||
@@ -77,21 +75,19 @@ class Madara extends MProvider {
|
|||||||
final res = await http('GET', json.encode(data));
|
final res = await http('GET', json.encode(data));
|
||||||
|
|
||||||
List<MManga> mangaList = [];
|
List<MManga> mangaList = [];
|
||||||
final urls =
|
final urls = xpath(res, '//*[@class^="tab-thumb c-image-hover"]/a/@href');
|
||||||
xpath(res, '//*[@class^="tab-thumb c-image-hover"]/a/@href');
|
final names = xpath(res, '//*[@class^="tab-thumb c-image-hover"]/a/@title');
|
||||||
final names =
|
var images =
|
||||||
xpath(res, '//*[@class^="tab-thumb c-image-hover"]/a/@title');
|
xpath(res, '//*[@class^="tab-thumb c-image-hover"]/a/img/@data-src');
|
||||||
var images = xpath(
|
|
||||||
res, '//*[@class^="tab-thumb c-image-hover"]/a/img/@data-src');
|
|
||||||
if (images.isEmpty) {
|
if (images.isEmpty) {
|
||||||
images = xpath(
|
images = xpath(
|
||||||
res, '//*[@class^="tab-thumb c-image-hover"]/a/img/@data-lazy-src');
|
res, '//*[@class^="tab-thumb c-image-hover"]/a/img/@data-lazy-src');
|
||||||
if (images.isEmpty) {
|
if (images.isEmpty) {
|
||||||
images = xpath(
|
images =
|
||||||
res, '//*[@class^="tab-thumb c-image-hover"]/a/img/@srcset');
|
xpath(res, '//*[@class^="tab-thumb c-image-hover"]/a/img/@srcset');
|
||||||
if (images.isEmpty) {
|
if (images.isEmpty) {
|
||||||
images = xpath(
|
images =
|
||||||
res, '//*[@class^="tab-thumb c-image-hover"]/a/img/@src');
|
xpath(res, '//*[@class^="tab-thumb c-image-hover"]/a/img/@src');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -158,39 +154,45 @@ class Madara extends MProvider {
|
|||||||
final datas = {"url": url, "sourceId": source.id};
|
final datas = {"url": url, "sourceId": source.id};
|
||||||
res = await http('GET', json.encode(datas));
|
res = await http('GET', json.encode(datas));
|
||||||
|
|
||||||
manga.author = querySelectorAll(res,
|
final author = querySelectorAll(res,
|
||||||
selector: "div.author-content > a",
|
selector: "div.author-content > a",
|
||||||
typeElement: 0,
|
typeElement: 0,
|
||||||
attributes: "",
|
attributes: "",
|
||||||
typeRegExp: 0)
|
typeRegExp: 0);
|
||||||
.first;
|
if (author.isNotEmpty) {
|
||||||
manga.description = querySelectorAll(res,
|
manga.author = author.first;
|
||||||
|
}
|
||||||
|
final description = querySelectorAll(res,
|
||||||
selector:
|
selector:
|
||||||
"div.description-summary div.summary__content, div.summary_content div.post-content_item > h5 + div, div.summary_content div.manga-excerpt, div.sinopsis div.contenedor, .description-summary > p",
|
"div.description-summary div.summary__content, div.summary_content div.post-content_item > h5 + div, div.summary_content div.manga-excerpt, div.sinopsis div.contenedor, .description-summary > p",
|
||||||
typeElement: 0,
|
typeElement: 0,
|
||||||
attributes: "",
|
attributes: "",
|
||||||
typeRegExp: 0)
|
typeRegExp: 0);
|
||||||
.first;
|
if (description.isNotEmpty) {
|
||||||
manga.imageUrl = querySelectorAll(res,
|
manga.description = description.first;
|
||||||
|
}
|
||||||
|
final imageUrl = querySelectorAll(res,
|
||||||
selector: "div.summary_image img",
|
selector: "div.summary_image img",
|
||||||
typeElement: 2,
|
typeElement: 2,
|
||||||
attributes: "",
|
attributes: "",
|
||||||
typeRegExp: 2)
|
typeRegExp: 2);
|
||||||
.first;
|
if (imageUrl.isNotEmpty) {
|
||||||
|
manga.imageUrl = imageUrl.first;
|
||||||
|
}
|
||||||
final mangaId = querySelectorAll(res,
|
final mangaId = querySelectorAll(res,
|
||||||
selector: "div[id^=manga-chapters-holder]",
|
selector: "div[id^=manga-chapters-holder]",
|
||||||
typeElement: 3,
|
typeElement: 3,
|
||||||
attributes: "data-id",
|
attributes: "data-id",
|
||||||
typeRegExp: 0)
|
typeRegExp: 0)
|
||||||
.first;
|
.first;
|
||||||
manga.status = parseStatus(
|
final status = querySelectorAll(res,
|
||||||
querySelectorAll(res,
|
|
||||||
selector: "div.summary-content",
|
selector: "div.summary-content",
|
||||||
typeElement: 0,
|
typeElement: 0,
|
||||||
attributes: "",
|
attributes: "",
|
||||||
typeRegExp: 0)
|
typeRegExp: 0);
|
||||||
.last,
|
if (status.isNotEmpty) {
|
||||||
statusList);
|
manga.status = parseStatus(status.last, statusList);
|
||||||
|
}
|
||||||
|
|
||||||
manga.genre = querySelectorAll(res,
|
manga.genre = querySelectorAll(res,
|
||||||
selector: "div.genres-content a",
|
selector: "div.genres-content a",
|
||||||
@@ -208,13 +210,9 @@ class Madara extends MProvider {
|
|||||||
"${baseUrl}wp-admin/admin-ajax.php?action=manga_get_chapters&manga=$mangaId";
|
"${baseUrl}wp-admin/admin-ajax.php?action=manga_get_chapters&manga=$mangaId";
|
||||||
final datasP = {"url": urll, "headers": headers, "sourceId": source.id};
|
final datasP = {"url": urll, "headers": headers, "sourceId": source.id};
|
||||||
res = await http('POST', json.encode(datasP));
|
res = await http('POST', json.encode(datasP));
|
||||||
if (res == "400") {
|
if (res == "error") {
|
||||||
final urlP = "${url}ajax/chapters";
|
final urlP = "${url}ajax/chapters";
|
||||||
final datasP = {
|
final datasP = {"url": urlP, "headers": headers, "sourceId": source.id};
|
||||||
"url": urlP,
|
|
||||||
"headers": headers,
|
|
||||||
"sourceId": source.id
|
|
||||||
};
|
|
||||||
res = await http('POST', json.encode(datasP));
|
res = await http('POST', json.encode(datasP));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -231,8 +229,8 @@ class Madara extends MProvider {
|
|||||||
dateF = xpath(resWebview,
|
dateF = xpath(resWebview,
|
||||||
"//*[@id='manga-chapters-holder']/div[2]/div/ul/li/span/i/text()");
|
"//*[@id='manga-chapters-holder']/div[2]/div/ul/li/span/i/text()");
|
||||||
}
|
}
|
||||||
var dateUploads = parseDates(
|
var dateUploads =
|
||||||
dateF, source.dateFormat, source.dateFormatLocale);
|
parseDates(dateF, source.dateFormat, source.dateFormatLocale);
|
||||||
if (dateF.length < chaptersNames.length) {
|
if (dateF.length < chaptersNames.length) {
|
||||||
final length = chaptersNames.length - dateF.length;
|
final length = chaptersNames.length - dateF.length;
|
||||||
String date = "${DateTime.now().millisecondsSinceEpoch}";
|
String date = "${DateTime.now().millisecondsSinceEpoch}";
|
||||||
@@ -240,8 +238,8 @@ class Madara extends MProvider {
|
|||||||
date += "--..${DateTime.now().millisecondsSinceEpoch}";
|
date += "--..${DateTime.now().millisecondsSinceEpoch}";
|
||||||
}
|
}
|
||||||
|
|
||||||
final dateFF = parseDates(
|
final dateFF =
|
||||||
dateF, source.dateFormat, source.dateFormatLocale);
|
parseDates(dateF, source.dateFormat, source.dateFormatLocale);
|
||||||
List<String> chapterDate = date.split('--..');
|
List<String> chapterDate = date.split('--..');
|
||||||
|
|
||||||
for (var date in dateFF) {
|
for (var date in dateFF) {
|
||||||
@@ -314,11 +312,6 @@ class Madara extends MProvider {
|
|||||||
}
|
}
|
||||||
return pageUrls;
|
return pageUrls;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
Future<List<MVideo>> getVideoList(MSource source, String url) async {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Madara main() {
|
Madara main() {
|
||||||
|
|||||||
@@ -92,33 +92,41 @@ class MangaReader extends MProvider {
|
|||||||
final datas = {"url": url, "sourceId": source.id};
|
final datas = {"url": url, "sourceId": source.id};
|
||||||
final res = await http('GET', json.encode(datas));
|
final res = await http('GET', json.encode(datas));
|
||||||
|
|
||||||
manga.author = xpath(
|
final author = xpath(
|
||||||
res,
|
res,
|
||||||
'//*[@class="imptdt" and contains(text(), "Author") or @class="infotable" and contains(text(), "Author") or @class="infotable" and contains(text(), "Auteur") or @class="fmed" and contains(text(), "Auteur") or @class="infotable" and contains(text(), "Autor")]/text()',
|
'//*[@class="imptdt" and contains(text(), "Author") or @class="infotable" and contains(text(), "Author") or @class="infotable" and contains(text(), "Auteur") or @class="fmed" and contains(text(), "Auteur") or @class="infotable" and contains(text(), "Autor")]/text()',
|
||||||
'')
|
'');
|
||||||
.first
|
|
||||||
|
if (author.isNotEmpty) {
|
||||||
|
manga.author = author.first
|
||||||
.replaceAll("Autor", "")
|
.replaceAll("Autor", "")
|
||||||
.replaceAll("Author", "")
|
.replaceAll("Author", "")
|
||||||
.replaceAll("Auteur", "")
|
.replaceAll("Auteur", "")
|
||||||
.replaceAll("[Add, ]", "");
|
.replaceAll("[Add, ]", "");
|
||||||
|
}
|
||||||
|
|
||||||
manga.description = querySelectorAll(res,
|
final description = querySelectorAll(res,
|
||||||
selector: ".desc, .entry-content[itemprop=description]",
|
selector: ".desc, .entry-content[itemprop=description]",
|
||||||
typeElement: 0,
|
typeElement: 0,
|
||||||
attributes: "",
|
attributes: "",
|
||||||
typeRegExp: 0)
|
typeRegExp: 0);
|
||||||
.first;
|
if (description.isNotEmpty) {
|
||||||
|
manga.description = description.first;
|
||||||
|
}
|
||||||
|
|
||||||
final status = xpath(
|
final status = xpath(
|
||||||
res,
|
res,
|
||||||
'//*[@class="imptdt" and contains(text(), "Status") or @class="imptdt" and contains(text(), "Estado") or @class="infotable" and contains(text(), "Status") or @class="infotable" and contains(text(), "Statut") or @class="imptdt" and contains(text(), "Statut")]/text()',
|
'//*[@class="imptdt" and contains(text(), "Status") or @class="imptdt" and contains(text(), "Estado") or @class="infotable" and contains(text(), "Status") or @class="infotable" and contains(text(), "Statut") or @class="imptdt" and contains(text(), "Statut")]/text()',
|
||||||
'')
|
'');
|
||||||
.first
|
|
||||||
|
if (status.isNotEmpty) {
|
||||||
|
manga.status = parseStatus(
|
||||||
|
status.first
|
||||||
.replaceAll("Status", "")
|
.replaceAll("Status", "")
|
||||||
.replaceAll("Estado", "")
|
.replaceAll("Estado", "")
|
||||||
.replaceAll("Statut", "");
|
.replaceAll("Statut", ""),
|
||||||
|
statusList);
|
||||||
manga.status = parseStatus(status, statusList);
|
}
|
||||||
|
|
||||||
manga.genre = xpath(res,
|
manga.genre = xpath(res,
|
||||||
'//*[@class="gnr" or @class="mgen" or @class="seriestugenre" ]/a/text()');
|
'//*[@class="gnr" or @class="mgen" or @class="seriestugenre" ]/a/text()');
|
||||||
@@ -130,8 +138,8 @@ class MangaReader extends MProvider {
|
|||||||
var chapterDates = xpath(res,
|
var chapterDates = xpath(res,
|
||||||
'//*[@class="bxcl" or @class="cl" or @class="chbox" or @class="eph-num" or @id="chapterlist"]/div/a/span[@class="chapterdate" and not(text()="{{date}}")]/text()');
|
'//*[@class="bxcl" or @class="cl" or @class="chbox" or @class="eph-num" or @id="chapterlist"]/div/a/span[@class="chapterdate" and not(text()="{{date}}")]/text()');
|
||||||
|
|
||||||
var dateUploads = parseDates(
|
var dateUploads =
|
||||||
chapterDates, source.dateFormat, source.dateFormatLocale);
|
parseDates(chapterDates, source.dateFormat, source.dateFormatLocale);
|
||||||
|
|
||||||
List<MChapter>? chaptersList = [];
|
List<MChapter>? chaptersList = [];
|
||||||
for (var i = 0; i < chaptersNames.length; i++) {
|
for (var i = 0; i < chaptersNames.length; i++) {
|
||||||
@@ -157,8 +165,7 @@ class MangaReader extends MProvider {
|
|||||||
pages = xpath(res, '//*[@id="readerarea"]/img/@src');
|
pages = xpath(res, '//*[@id="readerarea"]/img/@src');
|
||||||
}
|
}
|
||||||
if (pages.isEmpty || pages.length == 1) {
|
if (pages.isEmpty || pages.length == 1) {
|
||||||
final images =
|
final images = regExp(res, "\"images\"\\s*:\\s*(\\[.*?])", "", 1, 1);
|
||||||
regExp(res, "\"images\"\\s*:\\s*(\\[.*?])", "", 1, 1);
|
|
||||||
final pages = json.decode(images) as List;
|
final pages = json.decode(images) as List;
|
||||||
for (var page in pages) {
|
for (var page in pages) {
|
||||||
pagesUrl.add(page);
|
pagesUrl.add(page);
|
||||||
@@ -172,12 +179,10 @@ class MangaReader extends MProvider {
|
|||||||
|
|
||||||
MPages mangaRes(String res) {
|
MPages mangaRes(String res) {
|
||||||
List<MManga> mangaList = [];
|
List<MManga> mangaList = [];
|
||||||
final urls =
|
final urls = xpath(res, '//*[ @class="imgu" or @class="bsx"]/a/@href');
|
||||||
xpath(res, '//*[ @class="imgu" or @class="bsx"]/a/@href');
|
final names = xpath(res, '//*[ @class="imgu" or @class="bsx"]/a/@title');
|
||||||
final names =
|
final images =
|
||||||
xpath(res, '//*[ @class="imgu" or @class="bsx"]/a/@title');
|
xpath(res, '//*[ @class="imgu" or @class="bsx"]/a/div[1]/img/@src');
|
||||||
final images = xpath(
|
|
||||||
res, '//*[ @class="imgu" or @class="bsx"]/a/div[1]/img/@src');
|
|
||||||
|
|
||||||
for (var i = 0; i < names.length; i++) {
|
for (var i = 0; i < names.length; i++) {
|
||||||
MManga manga = MManga();
|
MManga manga = MManga();
|
||||||
@@ -196,11 +201,6 @@ class MangaReader extends MProvider {
|
|||||||
}
|
}
|
||||||
return "/manga";
|
return "/manga";
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
Future<List<MVideo>> getVideoList(MSource source, String url) async {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MangaReader main() {
|
MangaReader main() {
|
||||||
|
|||||||
@@ -9,6 +9,24 @@ const defaultDateFormatLocale = "en_US";
|
|||||||
|
|
||||||
List<Source> get mangareaderSourcesList => _mangareaderSourcesList;
|
List<Source> get mangareaderSourcesList => _mangareaderSourcesList;
|
||||||
List<Source> _mangareaderSourcesList = [
|
List<Source> _mangareaderSourcesList = [
|
||||||
|
Source(
|
||||||
|
name: "Beast Scans",
|
||||||
|
baseUrl: "https://beast-scans.com",
|
||||||
|
lang: "ar",
|
||||||
|
iconUrl: getIconUrl("asurascans", "en"),
|
||||||
|
dateFormat: "MMMM dd, yyyy",
|
||||||
|
dateFormatLocale: "ar",
|
||||||
|
version: mangareaderVersion,
|
||||||
|
sourceCodeUrl: mangareaderSourceCodeUrl),
|
||||||
|
Source(
|
||||||
|
name: "Lelmanga",
|
||||||
|
baseUrl: "https://www.lelmanga.com",
|
||||||
|
lang: "fr",
|
||||||
|
iconUrl: getIconUrl("lelmanga", "fr"),
|
||||||
|
dateFormat: "MMMM d, yyyy",
|
||||||
|
dateFormatLocale: "en",
|
||||||
|
version: mangareaderVersion,
|
||||||
|
sourceCodeUrl: mangareaderSourceCodeUrl),
|
||||||
Source(
|
Source(
|
||||||
name: "Asura Scans",
|
name: "Asura Scans",
|
||||||
baseUrl: "https://asuratoon.com/",
|
baseUrl: "https://asuratoon.com/",
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import 'package:mangayomi/bridge_lib.dart';
|
import 'package:mangayomi/bridge_lib.dart';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
class MMCRCms extends MProvider {
|
class MMRCMS extends MProvider {
|
||||||
MMCRCms();
|
MMRCMS();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<MPages> getPopular(MSource source, int page) async {
|
Future<MPages> getPopular(MSource source, int page) async {
|
||||||
@@ -131,35 +131,33 @@ class MMCRCms extends MProvider {
|
|||||||
final datas = {"url": url, "sourceId": source.id};
|
final datas = {"url": url, "sourceId": source.id};
|
||||||
final res = await http('GET', json.encode(datas));
|
final res = await http('GET', json.encode(datas));
|
||||||
|
|
||||||
manga.author = xpath(res,
|
final author = xpath(res,
|
||||||
'//*[@class="dl-horizontal"]/dt[contains(text(), "Auteur(s)") or contains(text(), "Author(s)") or contains(text(), "Autor(es)") or contains(text(), "Yazar(lar) or contains(text(), "Mangaka(lar)")]//following-sibling::dd[1]/text()')
|
'//*[@class="dl-horizontal"]/dt[contains(text(), "Auteur(s)") or contains(text(), "Author(s)") or contains(text(), "Autor(es)") or contains(text(), "Yazar(lar) or contains(text(), "Mangaka(lar)")]//following-sibling::dd[1]/text()');
|
||||||
.first;
|
if (author.isNotEmpty) {
|
||||||
|
manga.author = author.first;
|
||||||
|
}
|
||||||
final status = xpath(res,
|
final status = xpath(res,
|
||||||
'//*[@class="dl-horizontal"]/dt[contains(text(), "Statut") or contains(text(), "Status") or contains(text(), "Estado") or contains(text(), "Durum")]/following-sibling::dd[1]/text()')
|
'//*[@class="dl-horizontal"]/dt[contains(text(), "Statut") or contains(text(), "Status") or contains(text(), "Estado") or contains(text(), "Durum")]/following-sibling::dd[1]/text()');
|
||||||
.first;
|
if (status.isNotEmpty) {
|
||||||
manga.status = parseStatus(status, statusList);
|
manga.status = parseStatus(status.first, statusList);
|
||||||
manga.description =
|
}
|
||||||
xpath(res, '//*[@class="well" or @class="manga well"]/p/text()')
|
|
||||||
.first;
|
final description =
|
||||||
|
xpath(res, '//*[@class="well" or @class="manga well"]/p/text()');
|
||||||
|
if (description.isNotEmpty) {
|
||||||
|
manga.description = description.first;
|
||||||
|
}
|
||||||
|
|
||||||
manga.genre = xpath(res,
|
manga.genre = xpath(res,
|
||||||
'//*[@class="dl-horizontal"]/dt[contains(text(), "Categories") or contains(text(), "Categorias") or contains(text(), "Categorías") or contains(text(), "Catégories") or contains(text(), "Kategoriler" or contains(text(), "Kategorie") or contains(text(), "Kategori") or contains(text(), "Tagi"))]/following-sibling::dd[1]/text()');
|
'//*[@class="dl-horizontal"]/dt[contains(text(), "Categories") or contains(text(), "Categorias") or contains(text(), "Categorías") or contains(text(), "Catégories") or contains(text(), "Kategoriler" or contains(text(), "Kategorie") or contains(text(), "Kategori") or contains(text(), "Tagi"))]/following-sibling::dd[1]/text()');
|
||||||
|
|
||||||
final baseUrl = "${source.baseUrl}/";
|
var chapUrls = xpath(res, '//*[@class="chapter-title-rtl"]/a/@href');
|
||||||
final headers = {
|
var chaptersNames = xpath(res, '//*[@class="chapter-title-rtl"]/a/text()');
|
||||||
"Referer": baseUrl,
|
|
||||||
"Content-Type": "application/x-www-form-urlencoded",
|
|
||||||
"X-Requested-With": "XMLHttpRequest"
|
|
||||||
};
|
|
||||||
|
|
||||||
var chapUrls =
|
|
||||||
xpath(res, '//*[@class="chapter-title-rtl"]/a/@href');
|
|
||||||
var chaptersNames =
|
|
||||||
xpath(res, '//*[@class="chapter-title-rtl"]/a/text()');
|
|
||||||
var chaptersDates =
|
var chaptersDates =
|
||||||
xpath(res, '//*[@class="date-chapter-title-rtl"]/text()');
|
xpath(res, '//*[@class="date-chapter-title-rtl"]/text()');
|
||||||
|
|
||||||
var dateUploads = parseDates(
|
var dateUploads =
|
||||||
chaptersDates, source.dateFormat, source.dateFormatLocale);
|
parseDates(chaptersDates, source.dateFormat, source.dateFormatLocale);
|
||||||
|
|
||||||
List<MChapter>? chaptersList = [];
|
List<MChapter>? chaptersList = [];
|
||||||
for (var i = 0; i < chaptersNames.length; i++) {
|
for (var i = 0; i < chaptersNames.length; i++) {
|
||||||
@@ -179,8 +177,8 @@ class MMCRCms extends MProvider {
|
|||||||
final res = await http('GET', json.encode(datas));
|
final res = await http('GET', json.encode(datas));
|
||||||
|
|
||||||
List<String> pagesUrl = [];
|
List<String> pagesUrl = [];
|
||||||
final pages = xpath(
|
final pages =
|
||||||
res, '//*[@id="all"]/img[@class="img-responsive"]/@data-src');
|
xpath(res, '//*[@id="all"]/img[@class="img-responsive"]/@data-src');
|
||||||
for (var page in pages) {
|
for (var page in pages) {
|
||||||
if (page.startsWith('//')) {
|
if (page.startsWith('//')) {
|
||||||
pagesUrl.add(page.replaceAll('//', 'https://'));
|
pagesUrl.add(page.replaceAll('//', 'https://'));
|
||||||
@@ -191,13 +189,8 @@ class MMCRCms extends MProvider {
|
|||||||
|
|
||||||
return pagesUrl;
|
return pagesUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
Future<List<MVideo>> getVideoList(MSource source, String url) async {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MMCRCms main() {
|
MMRCMS main() {
|
||||||
return MMCRCms();
|
return MMRCMS();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,22 +70,7 @@ class NepNep extends MProvider {
|
|||||||
final vmChapters =
|
final vmChapters =
|
||||||
substringBefore(substringAfter(script, "vm.Chapters = "), ";");
|
substringBefore(substringAfter(script, "vm.Chapters = "), ";");
|
||||||
final chapters = json.decode(vmChapters) as List;
|
final chapters = json.decode(vmChapters) as List;
|
||||||
var chapUrls = chapters
|
|
||||||
.map((ch) =>
|
|
||||||
'/read-online/${substringAfter(url, "/manga/")}${chapterURLEncode(ch['Chapter'])}')
|
|
||||||
.toList();
|
|
||||||
|
|
||||||
var chaptersNames = chapters.map((ch) {
|
|
||||||
String name = ch['ChapterName'] ?? "";
|
|
||||||
String indexChapter = ch['Chapter'];
|
|
||||||
if (name.isEmpty) {
|
|
||||||
name = '${ch['Type']} ${chapterImage(indexChapter, true)}';
|
|
||||||
}
|
|
||||||
return name;
|
|
||||||
}).toList();
|
|
||||||
var chaptersDates = chapters.map((ch) => ch['Date']).toList();
|
|
||||||
var dateUploads =
|
|
||||||
parseDates(chaptersDates, source.dateFormat, source.dateFormatLocale);
|
|
||||||
List<MChapter> chaptersList = [];
|
List<MChapter> chaptersList = [];
|
||||||
|
|
||||||
for (var ch in chapters) {
|
for (var ch in chapters) {
|
||||||
@@ -219,11 +204,6 @@ class NepNep extends MProvider {
|
|||||||
|
|
||||||
return '-chapter-$n$suffix$index.html';
|
return '-chapter-$n$suffix$index.html';
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
Future<List<MVideo>> getVideoList(MSource source, String url) async {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, String> getHeader(String url) {
|
Map<String, String> getHeader(String url) {
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ List<Source> _nepnepSourcesList = [
|
|||||||
lang: "en",
|
lang: "en",
|
||||||
typeSource: "nepnep",
|
typeSource: "nepnep",
|
||||||
iconUrl: getIconUrl("mangasee", "en"),
|
iconUrl: getIconUrl("mangasee", "en"),
|
||||||
|
isFullData: true,
|
||||||
dateFormat: defaultDateFormat,
|
dateFormat: defaultDateFormat,
|
||||||
dateFormatLocale: defaultDateFormatLocale,
|
dateFormatLocale: defaultDateFormatLocale,
|
||||||
version: nepnepVersion,
|
version: nepnepVersion,
|
||||||
@@ -26,6 +27,7 @@ List<Source> _nepnepSourcesList = [
|
|||||||
lang: "en",
|
lang: "en",
|
||||||
typeSource: "nepnep",
|
typeSource: "nepnep",
|
||||||
iconUrl: getIconUrl("mangalife", "en"),
|
iconUrl: getIconUrl("mangalife", "en"),
|
||||||
|
isFullData: true,
|
||||||
dateFormat: defaultDateFormat,
|
dateFormat: defaultDateFormat,
|
||||||
dateFormatLocale: defaultDateFormatLocale,
|
dateFormatLocale: defaultDateFormatLocale,
|
||||||
version: nepnepVersion,
|
version: nepnepVersion,
|
||||||
|
|||||||
@@ -189,11 +189,6 @@ class Batoto extends MProvider {
|
|||||||
}
|
}
|
||||||
return "langs=$lang";
|
return "langs=$lang";
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
Future<List<MVideo>> getVideoList(MSource source, String url) async {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, String> getMirrorPref() {
|
Map<String, String> getMirrorPref() {
|
||||||
|
|||||||
@@ -166,11 +166,6 @@ class ComickFun extends MProvider {
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
Future<List<MVideo>> getVideoList(MSource source, String url) async {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, String> getHeader(String url) {
|
Map<String, String> getHeader(String url) {
|
||||||
|
|||||||
@@ -57,15 +57,10 @@ class MangaDex extends MProvider {
|
|||||||
res, r'$..data.relationships[*].attributes.name', ', ');
|
res, r'$..data.relationships[*].attributes.name', ', ');
|
||||||
|
|
||||||
String expressionDescriptionA = r'$..data.attributes.description.en';
|
String expressionDescriptionA = r'$..data.attributes.description.en';
|
||||||
String expressionDescription = regExp(
|
String expressionDescription = regExp(r'$..data.attributes.description[a]',
|
||||||
r'$..data.attributes.description[a]',
|
r'\[a\]', ".${source.lang}", 0, 1);
|
||||||
r'\[a\]',
|
|
||||||
".${source.lang}",
|
|
||||||
0,
|
|
||||||
1);
|
|
||||||
|
|
||||||
String description =
|
String description = jsonPathToString(res, expressionDescription, '');
|
||||||
jsonPathToString(res, expressionDescription, '');
|
|
||||||
if (description.isEmpty) {
|
if (description.isEmpty) {
|
||||||
description = jsonPathToString(res, expressionDescriptionA, '');
|
description = jsonPathToString(res, expressionDescriptionA, '');
|
||||||
}
|
}
|
||||||
@@ -81,29 +76,27 @@ class MangaDex extends MProvider {
|
|||||||
if (contentRating != "safe") {
|
if (contentRating != "safe") {
|
||||||
genres.add(contentRating);
|
genres.add(contentRating);
|
||||||
}
|
}
|
||||||
String publicationDemographic = jsonPathToString(
|
String publicationDemographic =
|
||||||
res, r'$..data.attributes.publicationDemographic', '');
|
jsonPathToString(res, r'$..data.attributes.publicationDemographic', '');
|
||||||
if (publicationDemographic == "null") {
|
if (publicationDemographic == "null") {
|
||||||
} else {
|
} else {
|
||||||
genres.add(publicationDemographic);
|
genres.add(publicationDemographic);
|
||||||
}
|
}
|
||||||
manga.genre = genres;
|
manga.genre = genres;
|
||||||
String statusRes =
|
String statusRes = jsonPathToString(res, r'$..data.attributes.status', '');
|
||||||
jsonPathToString(res, r'$..data.attributes.status', '');
|
|
||||||
manga.status = parseStatus(statusRes, statusList);
|
manga.status = parseStatus(statusRes, statusList);
|
||||||
final mangaId = url.split('/').last;
|
final mangaId = url.split('/').last;
|
||||||
|
|
||||||
final paginatedChapterList =
|
final paginatedChapterList =
|
||||||
await paginatedChapterListRequest(mangaId, 0, source.lang);
|
await paginatedChapterListRequest(mangaId, 0, source.lang);
|
||||||
final chapterList =
|
final chapterList =
|
||||||
jsonPathToString(paginatedChapterList, r'$.data[*]', '_.')
|
jsonPathToString(paginatedChapterList, r'$.data[*]', '_.').split('_.');
|
||||||
.split('_.');
|
int limit =
|
||||||
int limit = int.parse(
|
int.parse(jsonPathToString(paginatedChapterList, r'$.limit', ''));
|
||||||
jsonPathToString(paginatedChapterList, r'$.limit', ''));
|
int offset =
|
||||||
int offset = int.parse(
|
int.parse(jsonPathToString(paginatedChapterList, r'$.offset', ''));
|
||||||
jsonPathToString(paginatedChapterList, r'$.offset', ''));
|
int total =
|
||||||
int total = int.parse(
|
int.parse(jsonPathToString(paginatedChapterList, r'$.total', ''));
|
||||||
jsonPathToString(paginatedChapterList, r'$.total', ''));
|
|
||||||
List<MChapter> chapterListA = [];
|
List<MChapter> chapterListA = [];
|
||||||
|
|
||||||
final list =
|
final list =
|
||||||
@@ -115,8 +108,7 @@ class MangaDex extends MProvider {
|
|||||||
offset += limit;
|
offset += limit;
|
||||||
var newRequest =
|
var newRequest =
|
||||||
await paginatedChapterListRequest(mangaId, offset, source.lang);
|
await paginatedChapterListRequest(mangaId, offset, source.lang);
|
||||||
int total =
|
int total = int.parse(jsonPathToString(newRequest, r'$.total', ''));
|
||||||
int.parse(jsonPathToString(newRequest, r'$.total', ''));
|
|
||||||
final chapterList =
|
final chapterList =
|
||||||
jsonPathToString(paginatedChapterList, r'$.data[*]', '_.')
|
jsonPathToString(paginatedChapterList, r'$.data[*]', '_.')
|
||||||
.split('_.');
|
.split('_.');
|
||||||
@@ -159,8 +151,7 @@ class MangaDex extends MProvider {
|
|||||||
List<MChapter> getChapters(int length, String paginatedChapterListA) {
|
List<MChapter> getChapters(int length, String paginatedChapterListA) {
|
||||||
List<MChapter> chaptersList = [];
|
List<MChapter> chaptersList = [];
|
||||||
String paginatedChapterList = paginatedChapterListA.toString();
|
String paginatedChapterList = paginatedChapterListA.toString();
|
||||||
final dataList =
|
final dataList = jsonPathToList(paginatedChapterList, r'$.data[*]', 0);
|
||||||
jsonPathToList(paginatedChapterList, r'$.data[*]', 0);
|
|
||||||
for (var res in dataList) {
|
for (var res in dataList) {
|
||||||
String scan = "".toString();
|
String scan = "".toString();
|
||||||
final groups = jsonPathToList(res,
|
final groups = jsonPathToList(res,
|
||||||
@@ -215,9 +206,8 @@ class MangaDex extends MProvider {
|
|||||||
chapterr.name = chapName;
|
chapterr.name = chapName;
|
||||||
chapterr.url = id;
|
chapterr.url = id;
|
||||||
chapterr.scanlator = scan;
|
chapterr.scanlator = scan;
|
||||||
chapterr.dateUpload = parseDates(
|
chapterr.dateUpload =
|
||||||
[date], "yyyy-MM-dd'T'HH:mm:ss+SSS", "en_US")
|
parseDates([date], "yyyy-MM-dd'T'HH:mm:ss+SSS", "en_US").first;
|
||||||
.first;
|
|
||||||
chaptersList.add(chapterr);
|
chaptersList.add(chapterr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -268,11 +258,6 @@ class MangaDex extends MProvider {
|
|||||||
}
|
}
|
||||||
return coverFileName;
|
return coverFileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
Future<List<MVideo>> getVideoList(MSource source, String url) async {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MangaDex main() {
|
MangaDex main() {
|
||||||
|
|||||||
@@ -13,12 +13,12 @@ class MangaHere extends MProvider {
|
|||||||
final res = await http('POST', json.encode(data));
|
final res = await http('POST', json.encode(data));
|
||||||
|
|
||||||
List<MManga> mangaList = [];
|
List<MManga> mangaList = [];
|
||||||
final names = xpath(
|
final names =
|
||||||
res, '//*[ contains(@class, "manga-list-1-list")]/li/a/@title');
|
xpath(res, '//*[ contains(@class, "manga-list-1-list")]/li/a/@title');
|
||||||
final images = xpath(res,
|
final images = xpath(res,
|
||||||
'//*[ contains(@class, "manga-list-1-list")]/li/a/img[@class="manga-list-1-cover"]/@src');
|
'//*[ contains(@class, "manga-list-1-list")]/li/a/img[@class="manga-list-1-cover"]/@src');
|
||||||
final urls = xpath(
|
final urls =
|
||||||
res, '//*[ contains(@class, "manga-list-1-list")]/li/a/@href');
|
xpath(res, '//*[ contains(@class, "manga-list-1-list")]/li/a/@href');
|
||||||
|
|
||||||
for (var i = 0; i < names.length; i++) {
|
for (var i = 0; i < names.length; i++) {
|
||||||
MManga manga = MManga();
|
MManga manga = MManga();
|
||||||
@@ -40,12 +40,12 @@ class MangaHere extends MProvider {
|
|||||||
final res = await http('POST', json.encode(data));
|
final res = await http('POST', json.encode(data));
|
||||||
|
|
||||||
List<MManga> mangaList = [];
|
List<MManga> mangaList = [];
|
||||||
final names = xpath(
|
final names =
|
||||||
res, '//*[ contains(@class, "manga-list-1-list")]/li/a/@title');
|
xpath(res, '//*[ contains(@class, "manga-list-1-list")]/li/a/@title');
|
||||||
final images = xpath(res,
|
final images = xpath(res,
|
||||||
'//*[ contains(@class, "manga-list-1-list")]/li/a/img[@class="manga-list-1-cover"]/@src');
|
'//*[ contains(@class, "manga-list-1-list")]/li/a/img[@class="manga-list-1-cover"]/@src');
|
||||||
final urls = xpath(
|
final urls =
|
||||||
res, '//*[ contains(@class, "manga-list-1-list")]/li/a/@href');
|
xpath(res, '//*[ contains(@class, "manga-list-1-list")]/li/a/@href');
|
||||||
|
|
||||||
for (var i = 0; i < names.length; i++) {
|
for (var i = 0; i < names.length; i++) {
|
||||||
MManga manga = MManga();
|
MManga manga = MManga();
|
||||||
@@ -67,12 +67,12 @@ class MangaHere extends MProvider {
|
|||||||
final res = await http('POST', json.encode(data));
|
final res = await http('POST', json.encode(data));
|
||||||
|
|
||||||
List<MManga> mangaList = [];
|
List<MManga> mangaList = [];
|
||||||
final names = xpath(
|
final names =
|
||||||
res, '//*[contains(@class, "manga-list-4-list")]/li/a/@title');
|
xpath(res, '//*[contains(@class, "manga-list-4-list")]/li/a/@title');
|
||||||
final images = xpath(res,
|
final images = xpath(res,
|
||||||
'//*[contains(@class, "manga-list-4-list")]/li/a/img[@class="manga-list-4-cover"]/@src');
|
'//*[contains(@class, "manga-list-4-list")]/li/a/img[@class="manga-list-4-cover"]/@src');
|
||||||
final urls = xpath(
|
final urls =
|
||||||
res, '//*[contains(@class, "manga-list-4-list")]/li/a/@href');
|
xpath(res, '//*[contains(@class, "manga-list-4-list")]/li/a/@href');
|
||||||
|
|
||||||
for (var i = 0; i < names.length; i++) {
|
for (var i = 0; i < names.length; i++) {
|
||||||
MManga manga = MManga();
|
MManga manga = MManga();
|
||||||
@@ -95,25 +95,21 @@ class MangaHere extends MProvider {
|
|||||||
final res = await http('GET', json.encode(data));
|
final res = await http('GET', json.encode(data));
|
||||||
MManga manga = MManga();
|
MManga manga = MManga();
|
||||||
manga.author =
|
manga.author =
|
||||||
xpath(res, '//*[@class="detail-info-right-say"]/a/text()')
|
xpath(res, '//*[@class="detail-info-right-say"]/a/text()').first;
|
||||||
.first;
|
manga.description = xpath(res, '//*[@class="fullcontent"]/text()').first;
|
||||||
manga.description =
|
|
||||||
xpath(res, '//*[@class="fullcontent"]/text()').first;
|
|
||||||
final status =
|
final status =
|
||||||
xpath(res, '//*[@class="detail-info-right-title-tip"]/text()')
|
xpath(res, '//*[@class="detail-info-right-title-tip"]/text()').first;
|
||||||
.first;
|
|
||||||
manga.status = parseStatus(status, statusList);
|
manga.status = parseStatus(status, statusList);
|
||||||
manga.genre =
|
manga.genre =
|
||||||
xpath(res, '//*[@class="detail-info-right-tag-list"]/a/text()');
|
xpath(res, '//*[@class="detail-info-right-tag-list"]/a/text()');
|
||||||
|
|
||||||
var chapUrls =
|
var chapUrls = xpath(res, '//*[@class="detail-main-list"]/li/a/@href');
|
||||||
xpath(res, '//*[@class="detail-main-list"]/li/a/@href');
|
|
||||||
var chaptersNames = xpath(res,
|
var chaptersNames = xpath(res,
|
||||||
'//*[@class="detail-main-list"]/li/a/div/p[@class="title3"]/text()');
|
'//*[@class="detail-main-list"]/li/a/div/p[@class="title3"]/text()');
|
||||||
final chapterDates = xpath(res,
|
final chapterDates = xpath(res,
|
||||||
'//*[@class="detail-main-list"]/li/a/div/p[@class="title2"]/text()');
|
'//*[@class="detail-main-list"]/li/a/div/p[@class="title2"]/text()');
|
||||||
var dateUploads = parseDates(
|
var dateUploads =
|
||||||
chapterDates, source.dateFormat, source.dateFormatLocale);
|
parseDates(chapterDates, source.dateFormat, source.dateFormatLocale);
|
||||||
|
|
||||||
List<MChapter>? chaptersList = [];
|
List<MChapter>? chaptersList = [];
|
||||||
for (var i = 0; i < chaptersNames.length; i++) {
|
for (var i = 0; i < chaptersNames.length; i++) {
|
||||||
@@ -190,8 +186,7 @@ class MangaHere extends MProvider {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
String deobfuscatedScript =
|
String deobfuscatedScript = evalJs(responseText.replaceAll("eval", ""));
|
||||||
evalJs(responseText.replaceAll("eval", ""));
|
|
||||||
|
|
||||||
int baseLinkStartPos = deobfuscatedScript.indexOf("pix=") + 5;
|
int baseLinkStartPos = deobfuscatedScript.indexOf("pix=") + 5;
|
||||||
int baseLinkEndPos =
|
int baseLinkEndPos =
|
||||||
@@ -210,11 +205,6 @@ class MangaHere extends MProvider {
|
|||||||
|
|
||||||
return pageUrls;
|
return pageUrls;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
Future<List<MVideo>> getVideoList(MSource source, String url) async {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, String> getHeader(String url) {
|
Map<String, String> getHeader(String url) {
|
||||||
|
|||||||
Reference in New Issue
Block a user