mirror of
https://github.com/kodjodevf/mangayomi-extensions.git
synced 2026-02-14 02:41:39 +00:00
SushiScans fix baseUrl
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -127,9 +127,9 @@ class MangaReader extends MProvider {
|
||||
"hiatus": 2,
|
||||
}
|
||||
];
|
||||
|
||||
url = Uri.parse(url).path;
|
||||
MManga manga = MManga();
|
||||
final datas = {"url": url, "sourceId": source.id};
|
||||
final datas = {"url": "${source.baseUrl}$url", "sourceId": source.id};
|
||||
final res = await http('GET', json.encode(datas));
|
||||
|
||||
final author = xpath(
|
||||
@@ -200,10 +200,21 @@ class MangaReader extends MProvider {
|
||||
|
||||
List<String> pages = [];
|
||||
List<String> pagesUrl = [];
|
||||
bool invalidImgs = false;
|
||||
pages = xpath(res, '//*[@id="readerarea"]/p/img/@src');
|
||||
if (pages.isEmpty || pages.length == 1) {
|
||||
pages = xpath(res, '//*[@id="readerarea"]/img/@src');
|
||||
}
|
||||
if (pages.length > 1) {
|
||||
for (var page in pages) {
|
||||
if (page.contains("data:image")) {
|
||||
invalidImgs = true;
|
||||
}
|
||||
}
|
||||
if (invalidImgs) {
|
||||
pages = xpath(res, '//*[@id="readerarea"]/img/@data-src');
|
||||
}
|
||||
}
|
||||
if (pages.isEmpty || pages.length == 1) {
|
||||
final images = regExp(res, "\"images\"\\s*:\\s*(\\[.*?])", "", 1, 1);
|
||||
final pages = json.decode(images) as List;
|
||||
@@ -221,8 +232,19 @@ class MangaReader extends MProvider {
|
||||
List<MManga> mangaList = [];
|
||||
final urls = xpath(res, '//*[ @class="imgu" or @class="bsx"]/a/@href');
|
||||
final names = xpath(res, '//*[ @class="imgu" or @class="bsx"]/a/@title');
|
||||
final images =
|
||||
List<String> images = [];
|
||||
images =
|
||||
xpath(res, '//*[ @class="imgu" or @class="bsx"]/a/div[1]/img/@src');
|
||||
bool invalidImgs = false;
|
||||
for (var img in images) {
|
||||
if (img.contains("data:image")) {
|
||||
invalidImgs = true;
|
||||
}
|
||||
}
|
||||
if (invalidImgs) {
|
||||
images = xpath(
|
||||
res, '//*[ @class="imgu" or @class="bsx"]/a/div[1]/img/@data-src');
|
||||
}
|
||||
|
||||
for (var i = 0; i < names.length; i++) {
|
||||
MManga manga = MManga();
|
||||
@@ -39,7 +39,7 @@ import 'src/turktoon/turktoon.dart';
|
||||
import 'src/uzaymanga/uzaymanga.dart';
|
||||
import 'src/xcalibrscans/xcalibrscans.dart';
|
||||
|
||||
const mangareaderVersion = "0.0.55";
|
||||
const mangareaderVersion = "0.0.6";
|
||||
const mangareaderSourceCodeUrl =
|
||||
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/main/manga/multisrc/mangareader/mangareader-v$mangareaderVersion.dart";
|
||||
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
import '../../../../../model/source.dart';
|
||||
|
||||
Source get sushiscansSource => _sushiscansSource;
|
||||
|
||||
Source _sushiscansSource = Source(
|
||||
name: "Sushi-Scans",
|
||||
baseUrl: "https://sushiscan.fr",
|
||||
lang: "fr",
|
||||
typeSource: "mangareader",
|
||||
iconUrl:"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/main/manga/multisrc/mangareader/src/sushiscans/icon.png",
|
||||
dateFormat:"MMMM d, yyyy",
|
||||
dateFormatLocale:"fr",
|
||||
);
|
||||
Source get sushiscansSource => _sushiscansSource;
|
||||
|
||||
Source _sushiscansSource = Source(
|
||||
name: "Sushi-Scans",
|
||||
baseUrl: "https://anime-sama.me",
|
||||
lang: "fr",
|
||||
typeSource: "mangareader",
|
||||
iconUrl:
|
||||
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/main/manga/multisrc/mangareader/src/sushiscans/icon.png",
|
||||
dateFormat: "MMMM d, yyyy",
|
||||
dateFormatLocale: "fr",
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user