fix AniWorld video extractors

This commit is contained in:
kodjomoustapha
2024-11-05 11:09:20 +01:00
parent dd18acd1e8
commit b174ead469

View File

@@ -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/de/aniworld.js" "pkgPath": "anime/src/de/aniworld.js"
@@ -146,25 +146,29 @@ class DefaultExtension extends MProvider {
const hoster = element.selectFirst("a h4").text; const hoster = element.selectFirst("a h4").text;
if (hoster == "Streamtape" && hosterSelection.includes("Streamtape")) { if (hoster == "Streamtape" && hosterSelection.includes("Streamtape")) {
const body = (await new Client().get(redirectgs)).body; const location = (await new Client({ 'useDartHttpClient': true, "followRedirects": false }).get(redirectgs)).headers.location;
const quality = `Streamtape ${language}`; const quality = `Streamtape ${language}`;
const vids = await streamTapeExtractor(body.match(/https:\/\/streamtape\.com\/e\/[a-zA-Z0-9]+/g)[0], quality); const vids = await streamTapeExtractor(location, quality);
for (const vid of vids) { for (const vid of vids) {
videos.push(vid); videos.push(vid);
} }
} else if (hoster == "VOE" && hosterSelection.includes("VOE")) { } else if (hoster == "VOE" && hosterSelection.includes("VOE")) {
const body = (await new Client().get(redirectgs)).body; const location = (await new Client({ 'useDartHttpClient': true, "followRedirects": false }).get(redirectgs)).headers.location;
const quality = `VOE ${language}`; const quality = `VOE ${language}`;
const vids = await voeExtractor(body.match(/https:\/\/voe\.sx\/e\/[a-zA-Z0-9]+/g)[0], quality); const vids = await voeExtractor(location, quality);
for (const vid of vids) { for (const vid of vids) {
videos.push(vid); videos.push(vid);
} }
} else if (hoster == "Vidoza" && hosterSelection.includes("Vidoza")) { } else if (hoster == "Vidoza" && hosterSelection.includes("Vidoza")) {
const body = (await new Client().get(redirectgs)).body; const location = (await new Client({ 'useDartHttpClient': true, "followRedirects": false }).get(redirectgs)).headers.location;
const quality = `Vidoza ${language}`; const quality = `Vidoza ${language}`;
const match = body.match(/https:\/\/[^\s]*\.vidoza\.net\/[^\s]*\.mp4/g); videos.push({ url: location, originalUrl: location, quality });
if (match.length > 0) { } else if (hoster == "Doodstream" && hosterSelection.includes("Doodstream")) {
videos.push({ url: match[0], originalUrl: match[0], quality }); const location = (await new Client({ 'useDartHttpClient': true, "followRedirects": false }).get(redirectgs)).headers.location;
const quality = `Doodstream ${language}`;
const vids = await doodExtractor(location, quality);
for (const vid of vids) {
videos.push(vid);
} }
} }
} catch (_) { } catch (_) {
@@ -213,7 +217,7 @@ class DefaultExtension extends MProvider {
} }
}, },
{ {
"key": "preferred_hoster", "key": "preferred_hoster_new",
"listPreference": { "listPreference": {
"title": "Standard-Hoster", "title": "Standard-Hoster",
"summary": "", "summary": "",
@@ -221,34 +225,34 @@ class DefaultExtension extends MProvider {
"entries": [ "entries": [
"Streamtape", "Streamtape",
"VOE", "VOE",
"Vidoza" "Vidoza", "Doodstream"
], ],
"entryValues": [ "entryValues": [
"Streamtape", "Streamtape",
"VOE", "VOE",
"Vidoza" "Vidoza", "Doodstream"
] ]
} }
}, },
{ {
"key": "hoster_selection", "key": "hoster_selection_new",
"multiSelectListPreference": { "multiSelectListPreference": {
"title": "Hoster auswählen", "title": "Hoster auswählen",
"summary": "", "summary": "",
"entries": [ "entries": [
"Streamtape", "Streamtape",
"VOE", "VOE",
"Vidoza" "Vidoza", "Doodstream"
], ],
"entryValues": [ "entryValues": [
"Streamtape", "Streamtape",
"VOE", "VOE",
"Vidoza" "Vidoza", "Doodstream"
], ],
"values": [ "values": [
"Streamtape", "Streamtape",
"VOE", "VOE",
"Vidoza" "Vidoza", "Doodstream"
] ]
} }
} }