mirror of
https://github.com/kodjodevf/mangayomi-extensions.git
synced 2026-02-14 10:51:17 +00:00
@@ -108,6 +108,7 @@ class MangaReader extends MProvider {
|
|||||||
"Emision": 0,
|
"Emision": 0,
|
||||||
"En emision": 0,
|
"En emision": 0,
|
||||||
"مستمر": 0,
|
"مستمر": 0,
|
||||||
|
"ยังไม่จบ": 0,
|
||||||
"Đã hoàn thành": 1,
|
"Đã hoàn thành": 1,
|
||||||
"مكتملة": 1,
|
"مكتملة": 1,
|
||||||
"Завершено": 1,
|
"Завершено": 1,
|
||||||
@@ -127,7 +128,9 @@ class MangaReader extends MProvider {
|
|||||||
"Completata": 1,
|
"Completata": 1,
|
||||||
"One-Shot": 1,
|
"One-Shot": 1,
|
||||||
"Bitti": 1,
|
"Bitti": 1,
|
||||||
|
"จบแล้ว": 1,
|
||||||
"hiatus": 2,
|
"hiatus": 2,
|
||||||
|
"พักชั่วคราว": 2,
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
url = getUrlWithoutDomain(url);
|
url = getUrlWithoutDomain(url);
|
||||||
@@ -136,12 +139,12 @@ class MangaReader extends MProvider {
|
|||||||
final res = (await client.get(Uri.parse("$baseUrl$url"))).body;
|
final res = (await client.get(Uri.parse("$baseUrl$url"))).body;
|
||||||
List<String> author = xpath(
|
List<String> author = xpath(
|
||||||
res,
|
res,
|
||||||
"//table[contains(@class, 'infotable')]//tr[contains(text(), 'Author')]/td[last()]/text() | //div[contains(@class, 'tsinfo')]//div[contains(@class, 'imptdt') and contains(text(), 'Author')]//i/text() | //div[contains(@class, 'fmed')]//b[contains(text(), 'Author')]/following-sibling::span[1]/text() | //span[contains(text(), 'Author')]/text()",
|
"//table[contains(@class, 'infotable')]//tr[contains(text(), 'Author')]/td[last()]/text() | //div[contains(@class, 'tsinfo')]//div[contains(@class, 'imptdt') and contains(text(), 'Author')]//i/text() | //div[contains(@class, 'fmed')]//b[contains(text(), 'Author')]/following-sibling::span[1]/text() | //span[contains(text(), 'Author')]/text() | //div[contains(@class, 'tsinfo')]//div[contains(@class, 'imptdt')]//span[contains(text(), 'ผู้วาด')]/following-sibling::i/text()",
|
||||||
'');
|
'');
|
||||||
if (author.isEmpty) {
|
if (author.isEmpty) {
|
||||||
author = xpath(
|
author = xpath(
|
||||||
res,
|
res,
|
||||||
"//table[contains(@class, 'infotable')]//tr[contains(text(), '${authorLocalStr(source.lang)}')]/td[last()]/text() | //div[contains(@class, 'tsinfo')]//div[contains(@class, 'imptdt') and contains(text(), '${authorLocalStr(source.lang)}')]//i/text() | //div[contains(@class, 'fmed')]//b[contains(text(), '${authorLocalStr(source.lang)}')]/following-sibling::span[1]/text() | //span[contains(text(), '${authorLocalStr(source.lang)}')]/text()",
|
"//table[contains(@class, 'infotable')]//tr[contains(text(), '${authorLocalStr(source.lang)}')]/td[last()]/text() | //div[contains(@class, 'tsinfo')]//div[contains(@class, 'imptdt') and contains(text(), '${authorLocalStr(source.lang)}')]//i/text() | //div[contains(@class, 'fmed')]//b[contains(text(), '${authorLocalStr(source.lang)}')]/following-sibling::span[1]/text() | //span[contains(text(), '${authorLocalStr(source.lang)}')]/text() | //div[contains(@class, 'tsinfo')]//div[contains(@class, 'imptdt')]//span[contains(text(), 'ผู้แต่ง')]/following-sibling::i/text()",
|
||||||
'');
|
'');
|
||||||
}
|
}
|
||||||
if (author.isNotEmpty) {
|
if (author.isNotEmpty) {
|
||||||
@@ -149,7 +152,8 @@ class MangaReader extends MProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final description = parseHtml(res)
|
final description = parseHtml(res)
|
||||||
.selectFirst(".desc, .entry-content[itemprop=description]")
|
.selectFirst(
|
||||||
|
".desc, .entry-content[itemprop=description], .tsinfo > .wd-full > .entry-content[itemprop=description]")
|
||||||
?.text;
|
?.text;
|
||||||
|
|
||||||
if (description != null) {
|
if (description != null) {
|
||||||
@@ -158,7 +162,7 @@ class MangaReader extends MProvider {
|
|||||||
|
|
||||||
List<String> status = xpath(
|
List<String> status = xpath(
|
||||||
res,
|
res,
|
||||||
"//table[contains(@class, 'infotable')]//tr[contains(text(), 'Status')]/td[last()]/text() | //div[contains(@class, 'tsinfo')]//div[contains(@class, 'imptdt') and contains(text(), 'Status')]//i/text() | //div[contains(@class, 'fmed')]//b[contains(text(), 'Status')]/following-sibling::span[1]/text() | //span[contains(text(), 'Status')]/text()",
|
"//table[contains(@class, 'infotable')]//tr[contains(text(), 'Status')]/td[last()]/text() | //div[contains(@class, 'tsinfo')]//div[contains(@class, 'imptdt') and contains(text(), 'Status')]//i/text() | //div[contains(@class, 'fmed')]//b[contains(text(), 'Status')]/following-sibling::span[1]/text() | //span[contains(text(), 'Status')]/text() | | //div[contains(@class, 'tsinfo')]//div[contains(@class, 'imptdt')]//span[contains(text(), 'สถานะ')]/following-sibling::i/text()",
|
||||||
'');
|
'');
|
||||||
if (status.isEmpty) {
|
if (status.isEmpty) {
|
||||||
status = xpath(
|
status = xpath(
|
||||||
@@ -231,11 +235,13 @@ class MangaReader extends MProvider {
|
|||||||
|
|
||||||
MPages mangaRes(String res) {
|
MPages mangaRes(String res) {
|
||||||
List<MManga> mangaList = [];
|
List<MManga> mangaList = [];
|
||||||
final urls = xpath(res, '//*[ @class="imgu" or @class="bsx"]/a/@href');
|
final urls = xpath(
|
||||||
final names = xpath(res, '//*[ @class="imgu" or @class="bsx"]/a/@title');
|
res, '//*[ @class="imgu" or @class="bsx" or @class="card"]/a/@href');
|
||||||
|
final names = xpath(
|
||||||
|
res, '//*[ @class="imgu" or @class="bsx" or @class="card"]/a/@title');
|
||||||
List<String> images = [];
|
List<String> images = [];
|
||||||
images =
|
images = xpath(res,
|
||||||
xpath(res, '//*[ @class="imgu" or @class="bsx"]/a/div[1]/img/@src');
|
'//*[ @class="imgu" or @class="bsx"]/a/div[1]/img/@src | //div[@class="card"]/div[@class="card__img"]/@data-background-img');
|
||||||
bool invalidImgs = false;
|
bool invalidImgs = false;
|
||||||
for (var img in images) {
|
for (var img in images) {
|
||||||
if (img.contains("data:image")) {
|
if (img.contains("data:image")) {
|
||||||
@@ -243,8 +249,8 @@ class MangaReader extends MProvider {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (invalidImgs) {
|
if (invalidImgs) {
|
||||||
images = xpath(
|
images = xpath(res,
|
||||||
res, '//*[ @class="imgu" or @class="bsx"]/a/div[1]/img/@data-src');
|
'//*[ @class="imgu" or @class="bsx"]/a/div[1]/img/@data-src | //div[@class="card"]/a/div[@class="card__img--hover"]/@data-background-img');
|
||||||
}
|
}
|
||||||
for (var i = 0; i < names.length; i++) {
|
for (var i = 0; i < names.length; i++) {
|
||||||
MManga manga = MManga();
|
MManga manga = MManga();
|
||||||
|
|||||||
14
dart/manga/multisrc/mangareader/src/funtoons/funtoons.dart
Normal file
14
dart/manga/multisrc/mangareader/src/funtoons/funtoons.dart
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import '../../../../../../model/source.dart';
|
||||||
|
|
||||||
|
Source get funtoonsSource => _funtoonsSource;
|
||||||
|
Source _funtoonsSource = Source(
|
||||||
|
name: "FunToons",
|
||||||
|
baseUrl: "https://funtoons.online",
|
||||||
|
lang: "th",
|
||||||
|
isNsfw: true,
|
||||||
|
typeSource: "mangareader",
|
||||||
|
iconUrl:
|
||||||
|
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/dart/manga/multisrc/mangareader/src/funtoons/icon.png",
|
||||||
|
dateFormat: "MMMM dd, yyyy",
|
||||||
|
dateFormatLocale: "th",
|
||||||
|
hasCloudflare: true);
|
||||||
BIN
dart/manga/multisrc/mangareader/src/funtoons/icon.png
Normal file
BIN
dart/manga/multisrc/mangareader/src/funtoons/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
Reference in New Issue
Block a user