mirror of
https://github.com/kodjodevf/mangayomi-extensions.git
synced 2026-02-14 19:01:15 +00:00
Add New sources: BeastScan (AR), Lelmanga (FR) & remove unused code
This commit is contained in:
@@ -189,11 +189,6 @@ class Batoto extends MProvider {
|
||||
}
|
||||
return "langs=$lang";
|
||||
}
|
||||
|
||||
@override
|
||||
Future<List<MVideo>> getVideoList(MSource source, String url) async {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, String> getMirrorPref() {
|
||||
|
||||
@@ -166,11 +166,6 @@ class ComickFun extends MProvider {
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<List<MVideo>> getVideoList(MSource source, String url) async {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, String> getHeader(String url) {
|
||||
|
||||
@@ -57,15 +57,10 @@ class MangaDex extends MProvider {
|
||||
res, r'$..data.relationships[*].attributes.name', ', ');
|
||||
|
||||
String expressionDescriptionA = r'$..data.attributes.description.en';
|
||||
String expressionDescription = regExp(
|
||||
r'$..data.attributes.description[a]',
|
||||
r'\[a\]',
|
||||
".${source.lang}",
|
||||
0,
|
||||
1);
|
||||
String expressionDescription = regExp(r'$..data.attributes.description[a]',
|
||||
r'\[a\]', ".${source.lang}", 0, 1);
|
||||
|
||||
String description =
|
||||
jsonPathToString(res, expressionDescription, '');
|
||||
String description = jsonPathToString(res, expressionDescription, '');
|
||||
if (description.isEmpty) {
|
||||
description = jsonPathToString(res, expressionDescriptionA, '');
|
||||
}
|
||||
@@ -81,29 +76,27 @@ class MangaDex extends MProvider {
|
||||
if (contentRating != "safe") {
|
||||
genres.add(contentRating);
|
||||
}
|
||||
String publicationDemographic = jsonPathToString(
|
||||
res, r'$..data.attributes.publicationDemographic', '');
|
||||
String publicationDemographic =
|
||||
jsonPathToString(res, r'$..data.attributes.publicationDemographic', '');
|
||||
if (publicationDemographic == "null") {
|
||||
} else {
|
||||
genres.add(publicationDemographic);
|
||||
}
|
||||
manga.genre = genres;
|
||||
String statusRes =
|
||||
jsonPathToString(res, r'$..data.attributes.status', '');
|
||||
String statusRes = jsonPathToString(res, r'$..data.attributes.status', '');
|
||||
manga.status = parseStatus(statusRes, statusList);
|
||||
final mangaId = url.split('/').last;
|
||||
|
||||
final paginatedChapterList =
|
||||
await paginatedChapterListRequest(mangaId, 0, source.lang);
|
||||
final chapterList =
|
||||
jsonPathToString(paginatedChapterList, r'$.data[*]', '_.')
|
||||
.split('_.');
|
||||
int limit = int.parse(
|
||||
jsonPathToString(paginatedChapterList, r'$.limit', ''));
|
||||
int offset = int.parse(
|
||||
jsonPathToString(paginatedChapterList, r'$.offset', ''));
|
||||
int total = int.parse(
|
||||
jsonPathToString(paginatedChapterList, r'$.total', ''));
|
||||
jsonPathToString(paginatedChapterList, r'$.data[*]', '_.').split('_.');
|
||||
int limit =
|
||||
int.parse(jsonPathToString(paginatedChapterList, r'$.limit', ''));
|
||||
int offset =
|
||||
int.parse(jsonPathToString(paginatedChapterList, r'$.offset', ''));
|
||||
int total =
|
||||
int.parse(jsonPathToString(paginatedChapterList, r'$.total', ''));
|
||||
List<MChapter> chapterListA = [];
|
||||
|
||||
final list =
|
||||
@@ -115,8 +108,7 @@ class MangaDex extends MProvider {
|
||||
offset += limit;
|
||||
var newRequest =
|
||||
await paginatedChapterListRequest(mangaId, offset, source.lang);
|
||||
int total =
|
||||
int.parse(jsonPathToString(newRequest, r'$.total', ''));
|
||||
int total = int.parse(jsonPathToString(newRequest, r'$.total', ''));
|
||||
final chapterList =
|
||||
jsonPathToString(paginatedChapterList, r'$.data[*]', '_.')
|
||||
.split('_.');
|
||||
@@ -159,8 +151,7 @@ class MangaDex extends MProvider {
|
||||
List<MChapter> getChapters(int length, String paginatedChapterListA) {
|
||||
List<MChapter> chaptersList = [];
|
||||
String paginatedChapterList = paginatedChapterListA.toString();
|
||||
final dataList =
|
||||
jsonPathToList(paginatedChapterList, r'$.data[*]', 0);
|
||||
final dataList = jsonPathToList(paginatedChapterList, r'$.data[*]', 0);
|
||||
for (var res in dataList) {
|
||||
String scan = "".toString();
|
||||
final groups = jsonPathToList(res,
|
||||
@@ -215,9 +206,8 @@ class MangaDex extends MProvider {
|
||||
chapterr.name = chapName;
|
||||
chapterr.url = id;
|
||||
chapterr.scanlator = scan;
|
||||
chapterr.dateUpload = parseDates(
|
||||
[date], "yyyy-MM-dd'T'HH:mm:ss+SSS", "en_US")
|
||||
.first;
|
||||
chapterr.dateUpload =
|
||||
parseDates([date], "yyyy-MM-dd'T'HH:mm:ss+SSS", "en_US").first;
|
||||
chaptersList.add(chapterr);
|
||||
}
|
||||
}
|
||||
@@ -268,11 +258,6 @@ class MangaDex extends MProvider {
|
||||
}
|
||||
return coverFileName;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<List<MVideo>> getVideoList(MSource source, String url) async {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
MangaDex main() {
|
||||
|
||||
@@ -13,12 +13,12 @@ class MangaHere extends MProvider {
|
||||
final res = await http('POST', json.encode(data));
|
||||
|
||||
List<MManga> mangaList = [];
|
||||
final names = xpath(
|
||||
res, '//*[ contains(@class, "manga-list-1-list")]/li/a/@title');
|
||||
final names =
|
||||
xpath(res, '//*[ contains(@class, "manga-list-1-list")]/li/a/@title');
|
||||
final images = xpath(res,
|
||||
'//*[ contains(@class, "manga-list-1-list")]/li/a/img[@class="manga-list-1-cover"]/@src');
|
||||
final urls = xpath(
|
||||
res, '//*[ contains(@class, "manga-list-1-list")]/li/a/@href');
|
||||
final urls =
|
||||
xpath(res, '//*[ contains(@class, "manga-list-1-list")]/li/a/@href');
|
||||
|
||||
for (var i = 0; i < names.length; i++) {
|
||||
MManga manga = MManga();
|
||||
@@ -40,12 +40,12 @@ class MangaHere extends MProvider {
|
||||
final res = await http('POST', json.encode(data));
|
||||
|
||||
List<MManga> mangaList = [];
|
||||
final names = xpath(
|
||||
res, '//*[ contains(@class, "manga-list-1-list")]/li/a/@title');
|
||||
final names =
|
||||
xpath(res, '//*[ contains(@class, "manga-list-1-list")]/li/a/@title');
|
||||
final images = xpath(res,
|
||||
'//*[ contains(@class, "manga-list-1-list")]/li/a/img[@class="manga-list-1-cover"]/@src');
|
||||
final urls = xpath(
|
||||
res, '//*[ contains(@class, "manga-list-1-list")]/li/a/@href');
|
||||
final urls =
|
||||
xpath(res, '//*[ contains(@class, "manga-list-1-list")]/li/a/@href');
|
||||
|
||||
for (var i = 0; i < names.length; i++) {
|
||||
MManga manga = MManga();
|
||||
@@ -67,12 +67,12 @@ class MangaHere extends MProvider {
|
||||
final res = await http('POST', json.encode(data));
|
||||
|
||||
List<MManga> mangaList = [];
|
||||
final names = xpath(
|
||||
res, '//*[contains(@class, "manga-list-4-list")]/li/a/@title');
|
||||
final names =
|
||||
xpath(res, '//*[contains(@class, "manga-list-4-list")]/li/a/@title');
|
||||
final images = xpath(res,
|
||||
'//*[contains(@class, "manga-list-4-list")]/li/a/img[@class="manga-list-4-cover"]/@src');
|
||||
final urls = xpath(
|
||||
res, '//*[contains(@class, "manga-list-4-list")]/li/a/@href');
|
||||
final urls =
|
||||
xpath(res, '//*[contains(@class, "manga-list-4-list")]/li/a/@href');
|
||||
|
||||
for (var i = 0; i < names.length; i++) {
|
||||
MManga manga = MManga();
|
||||
@@ -95,25 +95,21 @@ class MangaHere extends MProvider {
|
||||
final res = await http('GET', json.encode(data));
|
||||
MManga manga = MManga();
|
||||
manga.author =
|
||||
xpath(res, '//*[@class="detail-info-right-say"]/a/text()')
|
||||
.first;
|
||||
manga.description =
|
||||
xpath(res, '//*[@class="fullcontent"]/text()').first;
|
||||
xpath(res, '//*[@class="detail-info-right-say"]/a/text()').first;
|
||||
manga.description = xpath(res, '//*[@class="fullcontent"]/text()').first;
|
||||
final status =
|
||||
xpath(res, '//*[@class="detail-info-right-title-tip"]/text()')
|
||||
.first;
|
||||
xpath(res, '//*[@class="detail-info-right-title-tip"]/text()').first;
|
||||
manga.status = parseStatus(status, statusList);
|
||||
manga.genre =
|
||||
xpath(res, '//*[@class="detail-info-right-tag-list"]/a/text()');
|
||||
|
||||
var chapUrls =
|
||||
xpath(res, '//*[@class="detail-main-list"]/li/a/@href');
|
||||
var chapUrls = xpath(res, '//*[@class="detail-main-list"]/li/a/@href');
|
||||
var chaptersNames = xpath(res,
|
||||
'//*[@class="detail-main-list"]/li/a/div/p[@class="title3"]/text()');
|
||||
final chapterDates = xpath(res,
|
||||
'//*[@class="detail-main-list"]/li/a/div/p[@class="title2"]/text()');
|
||||
var dateUploads = parseDates(
|
||||
chapterDates, source.dateFormat, source.dateFormatLocale);
|
||||
var dateUploads =
|
||||
parseDates(chapterDates, source.dateFormat, source.dateFormatLocale);
|
||||
|
||||
List<MChapter>? chaptersList = [];
|
||||
for (var i = 0; i < chaptersNames.length; i++) {
|
||||
@@ -190,8 +186,7 @@ class MangaHere extends MProvider {
|
||||
}
|
||||
}
|
||||
}
|
||||
String deobfuscatedScript =
|
||||
evalJs(responseText.replaceAll("eval", ""));
|
||||
String deobfuscatedScript = evalJs(responseText.replaceAll("eval", ""));
|
||||
|
||||
int baseLinkStartPos = deobfuscatedScript.indexOf("pix=") + 5;
|
||||
int baseLinkEndPos =
|
||||
@@ -210,11 +205,6 @@ class MangaHere extends MProvider {
|
||||
|
||||
return pageUrls;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<List<MVideo>> getVideoList(MSource source, String url) async {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, String> getHeader(String url) {
|
||||
|
||||
Reference in New Issue
Block a user