mirror of
https://github.com/kodjodevf/mangayomi-extensions.git
synced 2026-02-14 19:01:15 +00:00
Refactor
This commit is contained in:
@@ -148,14 +148,13 @@ class HeanCms extends MProvider {
|
||||
res = await http('GET', json.encode(data));
|
||||
|
||||
List<String> pageUrls = [];
|
||||
var imagesRes = querySelectorAll(res,
|
||||
selector: "div.min-h-screen > div.container > p.items-center",
|
||||
typeElement: 1,
|
||||
attributes: "",
|
||||
typeRegExp: 0);
|
||||
pageUrls = xpath(imagesRes.first, '//img/@src');
|
||||
var imagesRes = parseHtml(res)
|
||||
.selectFirst("div.min-h-screen > div.container > p.items-center")
|
||||
.innerHtml;
|
||||
|
||||
pageUrls.addAll(xpath(imagesRes.first, '//img/@data-src'));
|
||||
pageUrls = xpath(imagesRes, '//img/@src');
|
||||
|
||||
pageUrls.addAll(xpath(imagesRes, '//img/@data-src'));
|
||||
|
||||
return pageUrls.where((e) => e.isNotEmpty).toList();
|
||||
}
|
||||
|
||||
@@ -145,12 +145,11 @@ class MangaReader extends MProvider {
|
||||
.replaceAll("[Add, ]", "");
|
||||
}
|
||||
|
||||
final description = querySelectorAll(res,
|
||||
selector: ".desc, .entry-content[itemprop=description]",
|
||||
typeElement: 0,
|
||||
attributes: "",
|
||||
typeRegExp: 0);
|
||||
if (description.isNotEmpty) {
|
||||
final description = parseHtml(res)
|
||||
.selectFirst(".desc, .entry-content[itemprop=description]")
|
||||
?.text;
|
||||
|
||||
if (description != null) {
|
||||
manga.description = description.first;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user