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