This commit is contained in:
kodjomoustapha
2023-12-20 18:17:40 +01:00
parent 2f9703a850
commit 787ef77a7e
9 changed files with 71 additions and 159 deletions

View File

@@ -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();
}