mirror of
https://github.com/kodjodevf/mangayomi-extensions.git
synced 2026-02-14 02:41:39 +00:00
fixes
This commit is contained in:
@@ -10,6 +10,6 @@ Source _mangairoSource = Source(
|
|||||||
typeSource: "mangabox",
|
typeSource: "mangabox",
|
||||||
iconUrl:
|
iconUrl:
|
||||||
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/dart/manga/multisrc/mangabox/src/mangairo/icon.png",
|
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/dart/manga/multisrc/mangabox/src/mangairo/icon.png",
|
||||||
dateFormat: "dd-MM-yyyy",
|
dateFormat: "MMM-dd-yy",
|
||||||
dateFormatLocale: "en",
|
dateFormatLocale: "en",
|
||||||
);
|
);
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.0 KiB |
@@ -1,13 +0,0 @@
|
|||||||
import '../../../../../../model/source.dart';
|
|
||||||
|
|
||||||
Source get sushiscanfrSource => _sushiscanfrSource;
|
|
||||||
Source _sushiscanfrSource = Source(
|
|
||||||
name: "Sushiscan.fr",
|
|
||||||
baseUrl: "https://sushiscan.fr",
|
|
||||||
lang: "fr",
|
|
||||||
isNsfw:false,
|
|
||||||
typeSource: "mangareader",
|
|
||||||
iconUrl: "https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/dart/manga/multisrc/mangareader/src/sushiscanfr/icon.png",
|
|
||||||
dateFormat:"MMMM d, yyyy",
|
|
||||||
dateFormatLocale:"fr"
|
|
||||||
);
|
|
||||||
@@ -7,7 +7,7 @@ const mangayomiSources = [{
|
|||||||
"typeSource": "single",
|
"typeSource": "single",
|
||||||
"isManga": false,
|
"isManga": false,
|
||||||
"isNsfw": false,
|
"isNsfw": false,
|
||||||
"version": "0.0.1",
|
"version": "0.0.15",
|
||||||
"dateFormat": "",
|
"dateFormat": "",
|
||||||
"dateFormatLocale": "",
|
"dateFormatLocale": "",
|
||||||
"pkgPath": "anime/src/de/aniworld.js"
|
"pkgPath": "anime/src/de/aniworld.js"
|
||||||
@@ -132,38 +132,43 @@ class DefaultExtension extends MProvider {
|
|||||||
const hosterSelection = preference.get("hoster_selection");
|
const hosterSelection = preference.get("hoster_selection");
|
||||||
const videos = [];
|
const videos = [];
|
||||||
for (const element of redirectlink) {
|
for (const element of redirectlink) {
|
||||||
const langkey = element.attr("data-lang-key");
|
try {
|
||||||
let language = "";
|
const langkey = element.attr("data-lang-key");
|
||||||
if (langkey.includes("3")) {
|
let language = "";
|
||||||
language = "Deutscher Sub";
|
if (langkey.includes("3")) {
|
||||||
} else if (langkey.includes("1")) {
|
language = "Deutscher Sub";
|
||||||
language = "Deutscher Dub";
|
} else if (langkey.includes("1")) {
|
||||||
} else if (langkey.includes("2")) {
|
language = "Deutscher Dub";
|
||||||
language = "Englischer Sub";
|
} else if (langkey.includes("2")) {
|
||||||
}
|
language = "Englischer Sub";
|
||||||
const redirectgs = baseUrl + element.selectFirst("a.watchEpisode").attr("href");
|
|
||||||
const hoster = element.selectFirst("a h4").text;
|
|
||||||
if (hoster == "Streamtape" && hosterSelection.includes("Streamtape")) {
|
|
||||||
const body = (await new Client().get(redirectgs)).body;
|
|
||||||
const quality = `Streamtape ${language}`;
|
|
||||||
const vids = await streamTapeExtractor(body.match(/https:\/\/streamtape\.com\/e\/[a-zA-Z0-9]+/g)[0], quality);
|
|
||||||
for (const vid of vids) {
|
|
||||||
videos.push(vid);
|
|
||||||
}
|
}
|
||||||
} else if (hoster == "VOE" && hosterSelection.includes("VOE")) {
|
const redirectgs = baseUrl + element.selectFirst("a.watchEpisode").attr("href");
|
||||||
const body = (await new Client().get(redirectgs)).body;
|
const hoster = element.selectFirst("a h4").text;
|
||||||
const quality = `VOE ${language}`;
|
|
||||||
const vids = await voeExtractor(body.match(/https:\/\/voe\.sx\/e\/[a-zA-Z0-9]+/g)[0], quality);
|
if (hoster == "Streamtape" && hosterSelection.includes("Streamtape")) {
|
||||||
for (const vid of vids) {
|
const body = (await new Client().get(redirectgs)).body;
|
||||||
videos.push(vid);
|
const quality = `Streamtape ${language}`;
|
||||||
}
|
const vids = await streamTapeExtractor(body.match(/https:\/\/streamtape\.com\/e\/[a-zA-Z0-9]+/g)[0], quality);
|
||||||
} else if (hoster == "Vidoza" && hosterSelection.includes("Vidoza")) {
|
for (const vid of vids) {
|
||||||
const body = (await new Client().get(redirectgs)).body;
|
videos.push(vid);
|
||||||
const quality = `Vidoza ${language}`;
|
}
|
||||||
const match = body.match(/https:\/\/[^\s]*\.vidoza\.net\/[^\s]*\.mp4/g);
|
} else if (hoster == "VOE" && hosterSelection.includes("VOE")) {
|
||||||
if (match.length > 0) {
|
const body = (await new Client().get(redirectgs)).body;
|
||||||
videos.push({ url: match[0], originalUrl: match[0], quality });
|
const quality = `VOE ${language}`;
|
||||||
|
const vids = await voeExtractor(body.match(/https:\/\/voe\.sx\/e\/[a-zA-Z0-9]+/g)[0], quality);
|
||||||
|
for (const vid of vids) {
|
||||||
|
videos.push(vid);
|
||||||
|
}
|
||||||
|
} else if (hoster == "Vidoza" && hosterSelection.includes("Vidoza")) {
|
||||||
|
const body = (await new Client().get(redirectgs)).body;
|
||||||
|
const quality = `Vidoza ${language}`;
|
||||||
|
const match = body.match(/https:\/\/[^\s]*\.vidoza\.net\/[^\s]*\.mp4/g);
|
||||||
|
if (match.length > 0) {
|
||||||
|
videos.push({ url: match[0], originalUrl: match[0], quality });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} catch (_) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return this.sortVideos(videos);
|
return this.sortVideos(videos);
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ const mangayomiSources = [{
|
|||||||
"typeSource": "single",
|
"typeSource": "single",
|
||||||
"isManga": false,
|
"isManga": false,
|
||||||
"isNsfw": false,
|
"isNsfw": false,
|
||||||
"version": "0.0.15",
|
"version": "0.0.2",
|
||||||
"dateFormat": "",
|
"dateFormat": "",
|
||||||
"dateFormatLocale": "",
|
"dateFormatLocale": "",
|
||||||
"pkgPath": "anime/src/en/allanime.js"
|
"pkgPath": "anime/src/en/allanime.js"
|
||||||
@@ -371,108 +371,112 @@ class AllAnimeExtractor {
|
|||||||
}
|
}
|
||||||
const linkJson = JSON.parse(resp.body);
|
const linkJson = JSON.parse(resp.body);
|
||||||
for (const link of linkJson.links) {
|
for (const link of linkJson.links) {
|
||||||
const subtitles = [];
|
try {
|
||||||
if (link.subtitles && link.subtitles.length > 0) {
|
const subtitles = [];
|
||||||
subtitles.push(...link.subtitles.map(sub => {
|
if (link.subtitles && link.subtitles.length > 0) {
|
||||||
const label = sub.label ? ` - ${sub.label}` : '';
|
subtitles.push(...link.subtitles.map(sub => {
|
||||||
return { file: sub.src, label: `${sub.lang}${label}` };
|
const label = sub.label ? ` - ${sub.label}` : '';
|
||||||
}));
|
return { file: sub.src, label: `${sub.lang}${label}` };
|
||||||
}
|
}));
|
||||||
if (link.mp4) {
|
|
||||||
videoList.push({
|
|
||||||
url:
|
|
||||||
link.link,
|
|
||||||
quality: `Original (${name} - ${link.resolutionStr})`,
|
|
||||||
originalUrl: link.link,
|
|
||||||
subtitles,
|
|
||||||
});
|
|
||||||
} else if (link.hls) {
|
|
||||||
const headers =
|
|
||||||
{
|
|
||||||
'Host': link.link.match(/^(?:https?:\/\/)?(?:www\.)?([^\/]+)/)[1],
|
|
||||||
'Origin': endPoint,
|
|
||||||
'Referer': `${endPoint}/`
|
|
||||||
};
|
|
||||||
const resp = await new Client().get(link.link, headers);
|
|
||||||
|
|
||||||
if (resp.statusCode === 200) {
|
|
||||||
const masterPlaylist = resp.body;
|
|
||||||
const audios = [];
|
|
||||||
if (masterPlaylist.includes('#EXT-X-MEDIA:TYPE=AUDIO')) {
|
|
||||||
const audioInfo = masterPlaylist.substringAfter('#EXT-X-MEDIA:TYPE=AUDIO').substringBefore('\n');
|
|
||||||
const language = audioInfo.substringAfter('NAME="').substringBefore('"');
|
|
||||||
const url = audioInfo.substringAfter('URI="').substringBefore('"');
|
|
||||||
audios.push({ file: url, label: language });
|
|
||||||
}
|
|
||||||
if (!masterPlaylist.includes('#EXT-X-STREAM-INF:')) {
|
|
||||||
if (audios.length === 0) {
|
|
||||||
videoList.push({ url: link.link, quality: `${name} - ${link.resolutionStr}`, originalUrl: link.link, subtitles, headers });
|
|
||||||
} else {
|
|
||||||
videoList.push({ url: link.link, quality: `${name} - ${link.resolutionStr}`, originalUrl: link.link, subtitles, audios, headers });
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
masterPlaylist.substringAfter('#EXT-X-STREAM-INF:').split('#EXT-X-STREAM-INF:').forEach(it => {
|
|
||||||
let bandwidth = '';
|
|
||||||
if (it.includes('AVERAGE-BANDWIDTH')) {
|
|
||||||
bandwidth = ` ${this.bytesIntoHumanReadable(it.substringAfter('AVERAGE-BANDWIDTH=').substringBefore(','))}`;
|
|
||||||
}
|
|
||||||
const quality = `${it.substringAfter('RESOLUTION=').substringAfter('x').substringBefore(',')}p${bandwidth} (${name} - ${link.resolutionStr})`;
|
|
||||||
let videoUrl = it.substringAfter('\n').substringBefore('\n');
|
|
||||||
|
|
||||||
if (!videoUrl.startsWith('http')) {
|
|
||||||
videoUrl = resp.request.url.substringBeforeLast('/') + `/${videoUrl}`;
|
|
||||||
}
|
|
||||||
const headers =
|
|
||||||
{
|
|
||||||
'Host': videoUrl.match(/^(?:https?:\/\/)?(?:www\.)?([^\/]+)/)[1],
|
|
||||||
'Origin': endPoint,
|
|
||||||
'Referer': `${endPoint}/`
|
|
||||||
};
|
|
||||||
if (audios.length === 0) {
|
|
||||||
videoList.push({ url: videoUrl, quality, originalUrl: videoUrl, subtitles, headers });
|
|
||||||
} else {
|
|
||||||
videoList.push({ url: videoUrl, quality, originalUrl: videoUrl, subtitles, audios, headers });
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else if (link.crIframe) {
|
if (link.mp4) {
|
||||||
for (const stream of link.portData.streams) {
|
videoList.push({
|
||||||
if (stream.format === 'adaptive_dash') {
|
url:
|
||||||
videoList.push({
|
link.link,
|
||||||
url:
|
quality: `Original (${name} - ${link.resolutionStr})`,
|
||||||
stream.url,
|
originalUrl: link.link,
|
||||||
quality: `Original (AC - Dash${stream.hardsub_lang.length === 0 ? '' : ` - Hardsub: ${stream.hardsub_lang}`})`,
|
subtitles,
|
||||||
originalUrl: stream.url,
|
});
|
||||||
subtitles,
|
} else if (link.hls) {
|
||||||
});
|
const headers =
|
||||||
} else if (stream.format === 'adaptive_hls') {
|
{
|
||||||
const resp = await new Client().get(stream.url, { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0' })
|
'Host': link.link.match(/^(?:https?:\/\/)?(?:www\.)?([^\/]+)/)[1],
|
||||||
if (resp.statusCode === 200) {
|
'Origin': endPoint,
|
||||||
const masterPlaylist = resp.body;
|
'Referer': `${endPoint}/`
|
||||||
masterPlaylist.substringAfter('#EXT-X-STREAM-INF:').split('#EXT-X-STREAM-INF:').forEach(t => {
|
};
|
||||||
const quality = `${t.substringAfter('RESOLUTION=').substringAfter('x').substringBefore(',')}p (AC - HLS${stream.hardsub_lang.length === 0 ? '' : ` - Hardsub: ${stream.hardsub_lang}`})`;
|
const resp = await new Client().get(link.link, headers);
|
||||||
const videoUrl = t.substringAfter('\n').substringBefore('\n');
|
|
||||||
videoList.push({ url: videoUrl, quality, originalUrl: videoUrl, subtitles });
|
if (resp.statusCode === 200) {
|
||||||
|
const masterPlaylist = resp.body;
|
||||||
|
const audios = [];
|
||||||
|
if (masterPlaylist.includes('#EXT-X-MEDIA:TYPE=AUDIO')) {
|
||||||
|
const audioInfo = masterPlaylist.substringAfter('#EXT-X-MEDIA:TYPE=AUDIO').substringBefore('\n');
|
||||||
|
const language = audioInfo.substringAfter('NAME="').substringBefore('"');
|
||||||
|
const url = audioInfo.substringAfter('URI="').substringBefore('"');
|
||||||
|
audios.push({ file: url, label: language });
|
||||||
|
}
|
||||||
|
if (!masterPlaylist.includes('#EXT-X-STREAM-INF:')) {
|
||||||
|
if (audios.length === 0) {
|
||||||
|
videoList.push({ url: link.link, quality: `${name} - ${link.resolutionStr}`, originalUrl: link.link, subtitles, headers });
|
||||||
|
} else {
|
||||||
|
videoList.push({ url: link.link, quality: `${name} - ${link.resolutionStr}`, originalUrl: link.link, subtitles, audios, headers });
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
masterPlaylist.substringAfter('#EXT-X-STREAM-INF:').split('#EXT-X-STREAM-INF:').forEach(it => {
|
||||||
|
let bandwidth = '';
|
||||||
|
if (it.includes('AVERAGE-BANDWIDTH')) {
|
||||||
|
bandwidth = ` ${this.bytesIntoHumanReadable(it.substringAfter('AVERAGE-BANDWIDTH=').substringBefore(','))}`;
|
||||||
|
}
|
||||||
|
const quality = `${it.substringAfter('RESOLUTION=').substringAfter('x').substringBefore(',')}p${bandwidth} (${name} - ${link.resolutionStr})`;
|
||||||
|
let videoUrl = it.substringAfter('\n').substringBefore('\n');
|
||||||
|
|
||||||
|
if (!videoUrl.startsWith('http')) {
|
||||||
|
videoUrl = resp.request.url.substringBeforeLast('/') + `/${videoUrl}`;
|
||||||
|
}
|
||||||
|
const headers =
|
||||||
|
{
|
||||||
|
'Host': videoUrl.match(/^(?:https?:\/\/)?(?:www\.)?([^\/]+)/)[1],
|
||||||
|
'Origin': endPoint,
|
||||||
|
'Referer': `${endPoint}/`
|
||||||
|
};
|
||||||
|
if (audios.length === 0) {
|
||||||
|
videoList.push({ url: videoUrl, quality, originalUrl: videoUrl, subtitles, headers });
|
||||||
|
} else {
|
||||||
|
videoList.push({ url: videoUrl, quality, originalUrl: videoUrl, subtitles, audios, headers });
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else if (link.crIframe) {
|
||||||
} else if (link.dash) {
|
for (const stream of link.portData.streams) {
|
||||||
const audios = link.rawUrls && link.rawUrls.audios ? link.rawUrls.audios.map(it => { return { file: it.url, label: this.bytesIntoHumanReadable(it.bandwidth) }; }) : [];
|
if (stream.format === 'adaptive_dash') {
|
||||||
const videos = link.rawUrls && link.rawUrls.vids ? link.rawUrls.vids.map
|
videoList.push({
|
||||||
(it => {
|
url:
|
||||||
if (!audios) {
|
stream.url,
|
||||||
return { url: it.url, quality: `${name} - ${it.height} ${this.bytesIntoHumanReadable(it.bandwidth)}`, originalUrl: it.url, subtitles };
|
quality: `Original (AC - Dash${stream.hardsub_lang.length === 0 ? '' : ` - Hardsub: ${stream.hardsub_lang}`})`,
|
||||||
} else {
|
originalUrl: stream.url,
|
||||||
return { url: it.url, quality: `${name} - ${it.height} ${this.bytesIntoHumanReadable(it.bandwidth)}`, originalUrl: it.url, audios, subtitles };
|
subtitles,
|
||||||
|
});
|
||||||
|
} else if (stream.format === 'adaptive_hls') {
|
||||||
|
const resp = await new Client().get(stream.url, { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0' })
|
||||||
|
if (resp.statusCode === 200) {
|
||||||
|
const masterPlaylist = resp.body;
|
||||||
|
masterPlaylist.substringAfter('#EXT-X-STREAM-INF:').split('#EXT-X-STREAM-INF:').forEach(t => {
|
||||||
|
const quality = `${t.substringAfter('RESOLUTION=').substringAfter('x').substringBefore(',')}p (AC - HLS${stream.hardsub_lang.length === 0 ? '' : ` - Hardsub: ${stream.hardsub_lang}`})`;
|
||||||
|
const videoUrl = t.substringAfter('\n').substringBefore('\n');
|
||||||
|
videoList.push({ url: videoUrl, quality, originalUrl: videoUrl, subtitles });
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}) : [];
|
}
|
||||||
|
} else if (link.dash) {
|
||||||
|
const audios = link.rawUrls && link.rawUrls.audios ? link.rawUrls.audios.map(it => { return { file: it.url, label: this.bytesIntoHumanReadable(it.bandwidth) }; }) : [];
|
||||||
|
const videos = link.rawUrls && link.rawUrls.vids ? link.rawUrls.vids.map
|
||||||
|
(it => {
|
||||||
|
if (!audios) {
|
||||||
|
return { url: it.url, quality: `${name} - ${it.height} ${this.bytesIntoHumanReadable(it.bandwidth)}`, originalUrl: it.url, subtitles };
|
||||||
|
} else {
|
||||||
|
return { url: it.url, quality: `${name} - ${it.height} ${this.bytesIntoHumanReadable(it.bandwidth)}`, originalUrl: it.url, audios, subtitles };
|
||||||
|
}
|
||||||
|
}) : [];
|
||||||
|
|
||||||
if (videos.length > 0) {
|
if (videos.length > 0) {
|
||||||
videoList.push(...videos);
|
videoList.push(...videos);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} catch (_) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return videoList;
|
return videoList;
|
||||||
|
|||||||
Reference in New Issue
Block a user