From 4c35f6ffa5a5e6abe185d51398dd633b1a850377 Mon Sep 17 00:00:00 2001 From: Fallah Andy Prakasa Date: Wed, 19 Feb 2025 22:50:37 +0700 Subject: [PATCH 1/2] fix(anime): fixing get video list otakudesu --- dart/anime/src/id/otakudesu/otakudesu.dart | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dart/anime/src/id/otakudesu/otakudesu.dart b/dart/anime/src/id/otakudesu/otakudesu.dart index c9269896..aaadc436 100644 --- a/dart/anime/src/id/otakudesu/otakudesu.dart +++ b/dart/anime/src/id/otakudesu/otakudesu.dart @@ -123,8 +123,8 @@ class OtakuDesu extends MProvider { "action": action })) .body; - final html = utf8.decode( - base64Url.decode(substringBefore(substringAfter(res, ":\""), '"'))); + final resJson = json.decode(res); + final html = utf8.decode(base64Url.decode(resJson["data"])); String url = xpath(html, '//iframe/@src').first; if (url.contains("yourupload")) { final id = substringBefore(substringAfter(url, "id="), "&"); @@ -136,10 +136,10 @@ class OtakuDesu extends MProvider { final response = (await Client().get(Uri.parse(url))); final res = response.body; final script = - xpath(res, '//script[contains(text(), "sources")]/text()').first; - final videoUrl = substringBefore( - substringAfter(substringAfter(script, "sources:[{"), "file':'"), - "'"); + xpath(res, '//script[contains(text(), "file")]/text()').first; + final regex = RegExp(r'file:"(https?://[^"]+)"'); + final match = regex.firstMatch(script); + final videoUrl = match.group(1); if (videoUrl.endsWith(".mp4")) { MVideo video = MVideo(); video From 9763299ac7ce75b09b8f41d3ad4ac39b739e606f Mon Sep 17 00:00:00 2001 From: Fallah Andy Prakasa Date: Wed, 19 Feb 2025 22:57:08 +0700 Subject: [PATCH 2/2] chore(anime): bump otakudesu version to `v0.0.56` --- dart/anime/src/id/otakudesu/source.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dart/anime/src/id/otakudesu/source.dart b/dart/anime/src/id/otakudesu/source.dart index f91ae909..871dbee7 100644 --- a/dart/anime/src/id/otakudesu/source.dart +++ b/dart/anime/src/id/otakudesu/source.dart @@ -1,7 +1,7 @@ import '../../../../../model/source.dart'; Source get otakudesu => _otakudesu; -const _otakudesuVersion = "0.0.55"; +const _otakudesuVersion = "0.0.56"; const _otakudesuCodeUrl = "https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/dart/anime/src/id/otakudesu/otakudesu.dart"; Source _otakudesu = Source(