Merge pull request #166 from fllaa/main

Fix Otakudesu Get Video List
This commit is contained in:
Moustapha Kodjo Amadou
2025-02-21 15:57:42 +01:00
committed by GitHub
2 changed files with 7 additions and 7 deletions

View File

@@ -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

View File

@@ -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(