mirror of
https://github.com/kodjodevf/mangayomi-extensions.git
synced 2026-02-14 10:51:17 +00:00
HiAnime - Fix Cloudflare 403 Error
This commit is contained in:
@@ -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";
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user