mirror of
https://github.com/kodjodevf/mangayomi-extensions.git
synced 2026-02-14 10:51:17 +00:00
Gogoanime : add search method
This commit is contained in:
@@ -150,3 +150,22 @@ getVideoList(MangaModel anime) async {
|
||||
|
||||
return videos;
|
||||
}
|
||||
|
||||
searchAnime(MangaModel anime) async {
|
||||
final url =
|
||||
"${anime.baseUrl}/search.html?keyword=${anime.query}&page=${anime.page}";
|
||||
final data = {"url": url, "headers": null, "sourceId": anime.sourceId};
|
||||
final res = await MBridge.http(json.encode(data), 0);
|
||||
if (res.isEmpty) {
|
||||
return anime;
|
||||
}
|
||||
anime.urls =
|
||||
MBridge.xpath(res, '//*[@class="img"]/a/@href', '._').split('._');
|
||||
|
||||
anime.names =
|
||||
MBridge.xpath(res, '//*[@class="img"]/a/@title', '._').split('._');
|
||||
|
||||
anime.images =
|
||||
MBridge.xpath(res, '//*[@class="img"]/a/img/@src', '._').split('._');
|
||||
return anime;
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
import '../../../../model/source.dart';
|
||||
|
||||
Source get gogoanimeSource => _gogoanimeSource;
|
||||
const gogoanimeVersion = "0.0.11";
|
||||
const gogoanimeVersion = "0.0.12";
|
||||
const gogoanimeSourceCodeUrl =
|
||||
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/main/anime/src/en/gogoanime/gogoanime-v$gogoanimeVersion.dart";
|
||||
Source _gogoanimeSource = Source(
|
||||
|
||||
Reference in New Issue
Block a user