mirror of
https://github.com/kodjodevf/mangayomi-extensions.git
synced 2026-02-14 10:51:17 +00:00
first commit
This commit is contained in:
173
multisrc/mmrcms/mmrcms-v0.0.1.dart
Normal file
173
multisrc/mmrcms/mmrcms-v0.0.1.dart
Normal file
@@ -0,0 +1,173 @@
|
||||
// import 'dart:convert';
|
||||
// import 'package:bridge_lib/bridge_lib.dart';
|
||||
|
||||
// searchManga(MangaModel manga) async {
|
||||
// final url = "${manga.baseUrl}/search?query=${manga.query}";
|
||||
// final data = {"url": url, "headers": null, "sourceId": manga.sourceId};
|
||||
// final res = await MBridge.http(json.encode(data), 0);
|
||||
// if (res.isEmpty) {
|
||||
// return manga;
|
||||
// }
|
||||
// final jsonList = MBridge.jsonPathToList(res, r'$.suggestions[*]');
|
||||
// List<String> urls = [];
|
||||
// List<String> names = [];
|
||||
// List<String> images = [];
|
||||
// for (var da in jsonList) {
|
||||
// final value = MBridge.getMapValue(da, "value", 0);
|
||||
// final data = MBridge.getMapValue(da, "data", 0);
|
||||
|
||||
// if (manga.source == 'Scan VF') {
|
||||
// urls.add('${manga.baseUrl}/$data');
|
||||
// } else {
|
||||
// urls.add('${manga.baseUrl}/manga/$data');
|
||||
// }
|
||||
// names.add(value);
|
||||
// if (manga.source == "Manga-FR") {
|
||||
// images.add("${manga.baseUrl}/uploads/manga/$data.jpg");
|
||||
// } else {
|
||||
// images
|
||||
// .add("${manga.baseUrl}/uploads/manga/$data/cover/cover_250x350.jpg");
|
||||
// }
|
||||
// }
|
||||
// manga.names = names;
|
||||
// manga.urls = urls;
|
||||
// manga.images = images;
|
||||
// return manga;
|
||||
// }
|
||||
|
||||
// getPopularManga(MangaModel manga) async {
|
||||
// final url =
|
||||
// "${manga.baseUrl}/filterList?page=${manga.page}&sortBy=views&asc=false";
|
||||
// final data = {"url": url, "headers": null, "sourceId": manga.sourceId};
|
||||
// final res = await MBridge.http(json.encode(data), 0);
|
||||
// if (res.isEmpty) {
|
||||
// return manga;
|
||||
// }
|
||||
// manga.urls =
|
||||
// MBridge.xpath(res, '//*[ @class="chart-title"]/@href', '._').split('._');
|
||||
// manga.names =
|
||||
// MBridge.xpath(res, '//*[ @class="chart-title"]/text()', '._').split('._');
|
||||
// List<String> images = [];
|
||||
// for (var url in manga.urls) {
|
||||
// if (manga.source == "Manga-FR") {
|
||||
// images.add(
|
||||
// "${manga.baseUrl}/uploads/manga/${MBridge.listParse(MBridge.stringParse(url).split('/'), 2)[0]}.jpg");
|
||||
// } else {
|
||||
// images.add(
|
||||
// "${manga.baseUrl}/uploads/manga/${MBridge.listParse(MBridge.stringParse(url).split('/'), 2)[0]}/cover/cover_250x350.jpg");
|
||||
// }
|
||||
// }
|
||||
// manga.images = images;
|
||||
// return manga;
|
||||
// }
|
||||
|
||||
// getMangaDetail(MangaModel manga) async {
|
||||
// final statusList = [
|
||||
// {
|
||||
// "complete": 1,
|
||||
// "complet": 1,
|
||||
// "completo": 1,
|
||||
// "zakończone": 1,
|
||||
// "concluído": 1,
|
||||
// "مكتملة": 1,
|
||||
// "ongoing": 0,
|
||||
// "en cours": 0,
|
||||
// "em lançamento": 0,
|
||||
// "prace w toku": 0,
|
||||
// "ativo": 0,
|
||||
// "مستمرة": 0,
|
||||
// "em andamento": 0
|
||||
// }
|
||||
// ];
|
||||
|
||||
// final datas = {
|
||||
// "url": manga.link,
|
||||
// "headers": null,
|
||||
// "sourceId": manga.sourceId
|
||||
// };
|
||||
// final res = await MBridge.http(json.encode(datas), 0);
|
||||
// if (res.isEmpty) {
|
||||
// return manga;
|
||||
// }
|
||||
// manga.author = MBridge.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()',
|
||||
// '');
|
||||
// final status = MBridge.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()',
|
||||
// '');
|
||||
// manga.status = MBridge.parseStatus(status, statusList);
|
||||
// manga.description = MBridge.xpath(
|
||||
// res, '//*[@class="well" or @class="manga well"]/p/text()', '');
|
||||
// manga.genre = MBridge.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()',
|
||||
// '')
|
||||
// .split(',');
|
||||
// manga.names =
|
||||
// MBridge.xpath(res, '//*[@class="chapter-title-rtl"]/a/text()', "-.")
|
||||
// .split("-.");
|
||||
// manga.urls =
|
||||
// MBridge.xpath(res, '//*[@class="chapter-title-rtl"]/a/@href', "-.")
|
||||
// .split("-.");
|
||||
// final date =
|
||||
// MBridge.xpath(res, '//*[@class="date-chapter-title-rtl"]/text()', "-.")
|
||||
// .split("-.");
|
||||
// manga.chaptersDateUploads =
|
||||
// MBridge.listParseDateTime(date, "d MMM. yyyy", "en_US");
|
||||
|
||||
// return manga;
|
||||
// }
|
||||
|
||||
// getLatestUpdatesManga(MangaModel manga) async {
|
||||
// final url = "${manga.baseUrl}/latest-release?page=${manga.page}";
|
||||
// final data = {"url": url, "headers": null, "sourceId": manga.sourceId};
|
||||
// final res = await MBridge.http(json.encode(data), 0);
|
||||
// if (res.isEmpty) {
|
||||
// return manga;
|
||||
// }
|
||||
// manga.urls = MBridge.xpath(res, '//*[@class="manga-item"]/h3/a/@href', '._')
|
||||
// .split('._');
|
||||
// manga.names = MBridge.xpath(res, '//*[@class="manga-item"]/h3/a/text()', '._')
|
||||
// .split('._');
|
||||
// List<String> images = [];
|
||||
// for (var url in manga.urls) {
|
||||
// if (manga.source == "Manga-FR") {
|
||||
// images.add(
|
||||
// "${manga.baseUrl}/uploads/manga/${MBridge.listParse(MBridge.stringParse(url).split('/'), 2)[0]}.jpg");
|
||||
// } else {
|
||||
// images.add(
|
||||
// "${manga.baseUrl}/uploads/manga/${MBridge.listParse(MBridge.stringParse(url).split('/'), 2)[0]}/cover/cover_250x350.jpg");
|
||||
// }
|
||||
// }
|
||||
// manga.images = images;
|
||||
// return manga;
|
||||
// }
|
||||
|
||||
// getChapterUrl(MangaModel manga) async {
|
||||
// final datas = {
|
||||
// "url": manga.link,
|
||||
// "headers": null,
|
||||
// "sourceId": manga.sourceId
|
||||
// };
|
||||
// final res = await MBridge.http(json.encode(datas), 0);
|
||||
// if (res.isEmpty) {
|
||||
// return [];
|
||||
// }
|
||||
// List<String> pagesUrl = [];
|
||||
// final pages = MBridge.listParse(
|
||||
// MBridge.xpath(res,
|
||||
// '//*[@id="all"]/img[@class="img-responsive"]/@data-src', "._._")
|
||||
// .split("._._"),
|
||||
// 0);
|
||||
// for (var page in pages) {
|
||||
// if (page.startsWith('//')) {
|
||||
// pagesUrl.add(page.replaceAll('//', 'https://'));
|
||||
// } else {
|
||||
// pagesUrl.add(page);
|
||||
// }
|
||||
// }
|
||||
|
||||
// return pagesUrl;
|
||||
// }
|
||||
166
multisrc/mmrcms/sources.dart
Normal file
166
multisrc/mmrcms/sources.dart
Normal file
@@ -0,0 +1,166 @@
|
||||
import '../../model/source.dart';
|
||||
|
||||
const mmrcmsVersion = "0.0.1";
|
||||
const mmrcmsSourceCodeUrl =
|
||||
"https://raw.githubusercontent.com/kodjodevf/External-source-test/main/multisrc/mmrcms/mmrcms-v$mmrcmsVersion.dart";
|
||||
const defaultDateFormat = "d MMM. yyyy";
|
||||
const defaultDateFormatLocale = "en_US";
|
||||
|
||||
List<Source> get mmrcmsSourcesList => _mmrcmsSourcesList;
|
||||
List<Source> _mmrcmsSourcesList = [
|
||||
Source(
|
||||
name: "Scan FR",
|
||||
baseUrl: "https://www.scan-fr.org",
|
||||
lang: "fr",
|
||||
typeSource: "mmrcms",
|
||||
iconUrl: '',
|
||||
dateFormat: defaultDateFormat,
|
||||
dateFormatLocale: defaultDateFormatLocale,
|
||||
version: mmrcmsVersion,
|
||||
sourceCodeUrl: mmrcmsSourceCodeUrl,
|
||||
),
|
||||
Source(
|
||||
name: "Scan VF",
|
||||
baseUrl: "https://www.scan-vf.net",
|
||||
lang: "fr",
|
||||
typeSource: "mmrcms",
|
||||
iconUrl: '',
|
||||
dateFormat: defaultDateFormat,
|
||||
dateFormatLocale: defaultDateFormatLocale,
|
||||
version: mmrcmsVersion,
|
||||
sourceCodeUrl: mmrcmsSourceCodeUrl,
|
||||
),
|
||||
Source(
|
||||
name: "Komikid",
|
||||
baseUrl: "https://www.komikid.com",
|
||||
lang: "id",
|
||||
typeSource: "mmrcms",
|
||||
iconUrl: '',
|
||||
dateFormat: defaultDateFormat,
|
||||
dateFormatLocale: defaultDateFormatLocale,
|
||||
version: mmrcmsVersion,
|
||||
sourceCodeUrl: mmrcmsSourceCodeUrl,
|
||||
),
|
||||
Source(
|
||||
name: "MangaID",
|
||||
baseUrl: "https://mangaid.click",
|
||||
lang: "id",
|
||||
typeSource: "mmrcms",
|
||||
iconUrl: '',
|
||||
dateFormat: defaultDateFormat,
|
||||
dateFormatLocale: defaultDateFormatLocale,
|
||||
version: mmrcmsVersion,
|
||||
sourceCodeUrl: mmrcmsSourceCodeUrl,
|
||||
),
|
||||
Source(
|
||||
name: "Jpmangas",
|
||||
baseUrl: "https://jpmangas.cc",
|
||||
lang: "fr",
|
||||
typeSource: "mmrcms",
|
||||
iconUrl: '',
|
||||
dateFormat: defaultDateFormat,
|
||||
dateFormatLocale: defaultDateFormatLocale,
|
||||
version: mmrcmsVersion,
|
||||
sourceCodeUrl: mmrcmsSourceCodeUrl,
|
||||
),
|
||||
|
||||
Source(
|
||||
name: "مانجا اون لاين",
|
||||
baseUrl: "https://onma.top",
|
||||
lang: "ar",
|
||||
typeSource: "mmrcms",
|
||||
iconUrl: '',
|
||||
dateFormat: defaultDateFormat,
|
||||
dateFormatLocale: defaultDateFormatLocale,
|
||||
version: mmrcmsVersion,
|
||||
sourceCodeUrl: mmrcmsSourceCodeUrl,
|
||||
),
|
||||
Source(
|
||||
name: "Read Comics Online",
|
||||
baseUrl: "https://readcomicsonline.ru",
|
||||
lang: "en",
|
||||
typeSource: "mmrcms",
|
||||
iconUrl: '',
|
||||
dateFormat: defaultDateFormat,
|
||||
dateFormatLocale: defaultDateFormatLocale,
|
||||
version: mmrcmsVersion,
|
||||
sourceCodeUrl: mmrcmsSourceCodeUrl,
|
||||
), //
|
||||
Source(
|
||||
name: "Zahard",
|
||||
baseUrl: "https://zahard.xyz",
|
||||
lang: "en",
|
||||
typeSource: "mmrcms",
|
||||
iconUrl: '',
|
||||
dateFormat: defaultDateFormat,
|
||||
dateFormatLocale: defaultDateFormatLocale,
|
||||
version: mmrcmsVersion,
|
||||
sourceCodeUrl: mmrcmsSourceCodeUrl,
|
||||
),
|
||||
Source(
|
||||
name: "Mangadoor",
|
||||
baseUrl: "https://mangadoor.com",
|
||||
lang: "es",
|
||||
typeSource: "mmrcms",
|
||||
iconUrl: '',
|
||||
dateFormat: defaultDateFormat,
|
||||
dateFormatLocale: defaultDateFormatLocale,
|
||||
version: mmrcmsVersion,
|
||||
sourceCodeUrl: mmrcmsSourceCodeUrl,
|
||||
),
|
||||
Source(
|
||||
name: "Utsukushii",
|
||||
baseUrl: "https://manga.utsukushii-bg.com",
|
||||
lang: "bg",
|
||||
typeSource: "mmrcms",
|
||||
iconUrl: '',
|
||||
dateFormat: defaultDateFormat,
|
||||
dateFormatLocale: defaultDateFormatLocale,
|
||||
version: mmrcmsVersion,
|
||||
sourceCodeUrl: mmrcmsSourceCodeUrl,
|
||||
),
|
||||
Source(
|
||||
name: "Phoenix-Scans",
|
||||
baseUrl: "https://phoenix-scans.pl",
|
||||
lang: "pl",
|
||||
typeSource: "mmrcms",
|
||||
iconUrl: '',
|
||||
dateFormat: defaultDateFormat,
|
||||
dateFormatLocale: defaultDateFormatLocale,
|
||||
version: mmrcmsVersion,
|
||||
sourceCodeUrl: mmrcmsSourceCodeUrl,
|
||||
),
|
||||
Source(
|
||||
name: "Lelscan-VF",
|
||||
baseUrl: "https://www.lelscanvf.cc/",
|
||||
lang: "fr",
|
||||
typeSource: "mmrcms",
|
||||
iconUrl: '',
|
||||
dateFormat: defaultDateFormat,
|
||||
dateFormatLocale: defaultDateFormatLocale,
|
||||
version: mmrcmsVersion,
|
||||
sourceCodeUrl: mmrcmsSourceCodeUrl,
|
||||
),
|
||||
// Source(
|
||||
// name: "AnimaRegia",
|
||||
// baseUrl: "https://animaregia.net",
|
||||
// lang: "pt-BR",
|
||||
// typeSource: "mmrcms",
|
||||
// iconUrl: '',
|
||||
// dateFormat: defaultDateFormat,
|
||||
// dateFormatLocale: defaultDateFormatLocale,
|
||||
// version: mmrcmsVersion,
|
||||
// sourceCodeUrl: mmrcmsSourceCodeUrl,
|
||||
// ),
|
||||
Source(
|
||||
name: "Manga-FR",
|
||||
baseUrl: "https://manga-fr.me",
|
||||
lang: "fr",
|
||||
typeSource: "mmrcms",
|
||||
iconUrl: '',
|
||||
dateFormat: defaultDateFormat,
|
||||
dateFormatLocale: defaultDateFormatLocale,
|
||||
version: mmrcmsVersion,
|
||||
sourceCodeUrl: mmrcmsSourceCodeUrl,
|
||||
),
|
||||
];
|
||||
Reference in New Issue
Block a user