HiAnime - Fix Cloudflare 403 Error

This commit is contained in:
IruzzArcana
2025-03-26 16:45:37 +01:00
parent 51e5baa448
commit 1711628a5e
2 changed files with 8 additions and 4 deletions

View File

@@ -2,7 +2,7 @@ import '../../../../model/source.dart';
import 'src/hianime/hianime.dart';
import 'src/kaido/kaido.dart';
const _zorothemeVersion = "0.1.4";
const _zorothemeVersion = "0.1.5";
const _zorothemeSourceCodeUrl =
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/dart/anime/multisrc/zorotheme/zorotheme.dart";

View File

@@ -234,6 +234,7 @@ class ZoroTheme extends MProvider {
}
Future<List<MVideo>> rapidCloudExtractor(String url, String name) async {
final headers = {'Referer': 'https://megacloud.club/'};
final serverUrl = ['https://megacloud.tv', 'https://rapid-cloud.co'];
final serverType =
@@ -316,7 +317,8 @@ class ZoroTheme extends MProvider {
}
if (type == "hls") {
final masterPlaylistRes = (await client.get(Uri.parse(masterUrl))).body;
final masterPlaylistRes =
(await client.get(Uri.parse(masterUrl), headers: headers)).body;
for (var it in substringAfter(
masterPlaylistRes,
@@ -337,7 +339,8 @@ class ZoroTheme extends MProvider {
..url = videoUrl
..originalUrl = videoUrl
..quality = "$name - $quality"
..subtitles = subtitles;
..subtitles = subtitles
..headers = headers;
videos.add(video);
}
} else {
@@ -346,7 +349,8 @@ class ZoroTheme extends MProvider {
..url = masterUrl
..originalUrl = masterUrl
..quality = "$name - Default"
..subtitles = subtitles;
..subtitles = subtitles
..headers = headers;
videos.add(video);
}
return videos;