mirror of
https://github.com/kodjodevf/mangayomi-extensions.git
synced 2026-02-14 02:41:39 +00:00
Merge pull request #107 from RndDev123/main
Aniworld: New Host & Language preference filters + lib update
This commit is contained in:
@@ -7,7 +7,7 @@ const mangayomiSources = [{
|
||||
"typeSource": "single",
|
||||
"isManga": false,
|
||||
"isNsfw": false,
|
||||
"version": "0.3.0",
|
||||
"version": "0.3.1",
|
||||
"dateFormat": "",
|
||||
"dateFormatLocale": "",
|
||||
"pkgPath": "anime/src/de/aniworld.js"
|
||||
@@ -136,17 +136,20 @@ class DefaultExtension extends MProvider {
|
||||
let promises = [];
|
||||
const videos = [];
|
||||
|
||||
const preferences = new SharedPreferences();
|
||||
const hostFilter = preferences.get("host_filter");
|
||||
const langFilter = preferences.get("lang_filter");
|
||||
|
||||
const redirectsElements = document.select("ul.row li");
|
||||
const hostFilter = new SharedPreferences().get("host_filter");
|
||||
const dartClient = new Client({ 'useDartHttpClient': true, "followRedirects": false });
|
||||
|
||||
for (const element of redirectsElements) {
|
||||
const langkey = element.attr("data-lang-key");
|
||||
const lang = (langkey == 1 || langkey == 3) ? 'Deutscher' : 'Englischer';
|
||||
const type = (langkey == 1) ? 'Dub' : 'Sub';
|
||||
const host = element.selectFirst("a h4").text;
|
||||
|
||||
if (hostFilter.includes(host)) {
|
||||
const langkey = element.attr("data-lang-key");
|
||||
const lang = (langkey == 1 || langkey == 3) ? 'Deutscher' : 'Englischer';
|
||||
const type = (langkey == 1) ? 'Dub' : 'Sub';
|
||||
if (hostFilter.includes(host) && langFilter.includes(`${lang} ${type}`)) {
|
||||
const redirect = baseUrl + element.selectFirst("a.watchEpisode").attr("href");
|
||||
promises.push((async (redirect, lang, type, host) => {
|
||||
const location = (await dartClient.get(redirect)).headers.location;
|
||||
@@ -166,7 +169,14 @@ class DefaultExtension extends MProvider {
|
||||
const languageValues = ['Deutscher', 'Englischer'];
|
||||
const types = ['Dub', 'Sub'];
|
||||
const resolutions = ['1080p', '720p', '480p'];
|
||||
const hosts = ['Doodstream', 'Filemoon', 'SpeedFiles', 'Streamtape', 'Vidoza', 'VOE'];
|
||||
const hosts = ['Doodstream', 'Filemoon', 'Luluvdo', 'SpeedFiles', 'Streamtape', 'Vidoza', 'VOE'];
|
||||
const languageFilters = [];
|
||||
|
||||
for (const lang of languageValues) {
|
||||
for (const type of types) {
|
||||
languageFilters.push(`${lang} ${type}`);
|
||||
}
|
||||
}
|
||||
|
||||
return [
|
||||
{
|
||||
@@ -209,11 +219,21 @@ class DefaultExtension extends MProvider {
|
||||
entryValues: hosts
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "lang_filter",
|
||||
multiSelectListPreference: {
|
||||
title: "Sprachen auswählen",
|
||||
summary: "Wähle aus welche Sprachen dir angezeigt werden sollen. Weniger streams zu laden beschleunigt den Start der Videos.",
|
||||
entries: languageFilters,
|
||||
entryValues: languageFilters,
|
||||
values: languageFilters
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "host_filter",
|
||||
multiSelectListPreference: {
|
||||
title: "Hoster auswählen",
|
||||
summary: "Wähle aus welche Hoster dir angezeigt werden sollen. Weniger hoster zu laden beschleunigt den Start der Videos.",
|
||||
summary: "Wähle aus welche Hoster dir angezeigt werden sollen. Weniger streams zu laden beschleunigt den Start der Videos.",
|
||||
entries: hosts,
|
||||
entryValues: hosts,
|
||||
values: hosts
|
||||
@@ -225,7 +245,7 @@ class DefaultExtension extends MProvider {
|
||||
|
||||
/***************************************************************************************************
|
||||
*
|
||||
* mangayomi-js-helpers v1.1
|
||||
* mangayomi-js-helpers v1.2
|
||||
*
|
||||
* # Video Extractors
|
||||
* - vidGuardExtractor
|
||||
@@ -237,6 +257,7 @@ class DefaultExtension extends MProvider {
|
||||
* - filemoonExtractor
|
||||
* - mixdropExtractor
|
||||
* - speedfilesExtractor
|
||||
* - luluvdoExtractor
|
||||
* - burstcloudExtractor (not working, see description)
|
||||
*
|
||||
* # Video Extractor Wrappers
|
||||
@@ -363,15 +384,20 @@ async function vidHideExtractor(url) {
|
||||
}
|
||||
|
||||
async function filemoonExtractor(url, headers) {
|
||||
headers = headers ?? {};
|
||||
headers['User-Agent'] = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36';
|
||||
delete headers['user-agent'];
|
||||
|
||||
let res = await new Client().get(url, headers);
|
||||
const src = res.body.match(/iframe src="(.*?)"/)?.[1];
|
||||
if (src) {
|
||||
res = await new Client().get(src, {
|
||||
'Referer': url,
|
||||
'Accept-Language': 'de,en-US;q=0.7,en;q=0.3'
|
||||
'Accept-Language': 'de,en-US;q=0.7,en;q=0.3',
|
||||
'User-Agent': headers['User-Agent']
|
||||
});
|
||||
}
|
||||
return await jwplayerExtractor(res.body);
|
||||
return await jwplayerExtractor(res.body, headers);
|
||||
}
|
||||
|
||||
async function mixdropExtractor(url) {
|
||||
@@ -426,6 +452,14 @@ async function speedfilesExtractor(url) {
|
||||
return [{url: videoUrl, originalUrl: videoUrl, quality: '', headers: null}];
|
||||
}
|
||||
|
||||
async function luluvdoExtractor(url) {
|
||||
const client = new Client();
|
||||
const match = url.match(/(.*?:\/\/.*?)\/.*\/(.*)/);
|
||||
const headers = {'user-agent': 'Mangayomi'};
|
||||
const res = await client.get(`${match[1]}/dl?op=embed&file_code=${match[2]}`, headers);
|
||||
return await jwplayerExtractor(res.body, headers);
|
||||
}
|
||||
|
||||
/** Does not work: Client always sets 'charset=utf-8' in Content-Type. */
|
||||
async function burstcloudExtractor(url) {
|
||||
let client = new Client();
|
||||
@@ -527,6 +561,7 @@ extractAny.methods = {
|
||||
'burstcloud': burstcloudExtractor,
|
||||
'doodstream': doodExtractor,
|
||||
'filemoon': filemoonExtractor,
|
||||
'luluvdo': luluvdoExtractor,
|
||||
'mixdrop': mixdropExtractor,
|
||||
'mp4upload': mp4UploadExtractor,
|
||||
'okru': okruExtractor,
|
||||
@@ -578,6 +613,10 @@ async function m3u8Extractor(url, headers = null) {
|
||||
const res = await new Client().get(url, headers);
|
||||
const text = res.body;
|
||||
|
||||
if (res.statusCode != 200) {
|
||||
return [];
|
||||
}
|
||||
|
||||
// collect media
|
||||
for (const match of text.matchAll(/#EXT-X-MEDIA:(.*)/g)) {
|
||||
const info = match[1], medium = {};
|
||||
|
||||
@@ -6,7 +6,7 @@ const mangayomiSources = [{
|
||||
"iconUrl": "https://www3.animefenix.tv/themes/fenix-neo/images/AveFenix.png",
|
||||
"typeSource": "single",
|
||||
"isManga": false,
|
||||
"version": "0.1.12",
|
||||
"version": "0.1.13",
|
||||
"dateFormat": "",
|
||||
"dateFormatLocale": "",
|
||||
"pkgPath": "anime/src/es/animefenix.js"
|
||||
@@ -293,7 +293,7 @@ class DefaultExtension extends MProvider {
|
||||
|
||||
/***************************************************************************************************
|
||||
*
|
||||
* mangayomi-js-helpers v1.1
|
||||
* mangayomi-js-helpers v1.2
|
||||
*
|
||||
* # Video Extractors
|
||||
* - vidGuardExtractor
|
||||
@@ -305,6 +305,7 @@ class DefaultExtension extends MProvider {
|
||||
* - filemoonExtractor
|
||||
* - mixdropExtractor
|
||||
* - speedfilesExtractor
|
||||
* - luluvdoExtractor
|
||||
* - burstcloudExtractor (not working, see description)
|
||||
*
|
||||
* # Video Extractor Wrappers
|
||||
@@ -431,15 +432,20 @@ async function vidHideExtractor(url) {
|
||||
}
|
||||
|
||||
async function filemoonExtractor(url, headers) {
|
||||
headers = headers ?? {};
|
||||
headers['User-Agent'] = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36';
|
||||
delete headers['user-agent'];
|
||||
|
||||
let res = await new Client().get(url, headers);
|
||||
const src = res.body.match(/iframe src="(.*?)"/)?.[1];
|
||||
if (src) {
|
||||
res = await new Client().get(src, {
|
||||
'Referer': url,
|
||||
'Accept-Language': 'de,en-US;q=0.7,en;q=0.3'
|
||||
'Accept-Language': 'de,en-US;q=0.7,en;q=0.3',
|
||||
'User-Agent': headers['User-Agent']
|
||||
});
|
||||
}
|
||||
return await jwplayerExtractor(res.body);
|
||||
return await jwplayerExtractor(res.body, headers);
|
||||
}
|
||||
|
||||
async function mixdropExtractor(url) {
|
||||
@@ -494,6 +500,14 @@ async function speedfilesExtractor(url) {
|
||||
return [{url: videoUrl, originalUrl: videoUrl, quality: '', headers: null}];
|
||||
}
|
||||
|
||||
async function luluvdoExtractor(url) {
|
||||
const client = new Client();
|
||||
const match = url.match(/(.*?:\/\/.*?)\/.*\/(.*)/);
|
||||
const headers = {'user-agent': 'Mangayomi'};
|
||||
const res = await client.get(`${match[1]}/dl?op=embed&file_code=${match[2]}`, headers);
|
||||
return await jwplayerExtractor(res.body, headers);
|
||||
}
|
||||
|
||||
/** Does not work: Client always sets 'charset=utf-8' in Content-Type. */
|
||||
async function burstcloudExtractor(url) {
|
||||
let client = new Client();
|
||||
@@ -595,6 +609,7 @@ extractAny.methods = {
|
||||
'burstcloud': burstcloudExtractor,
|
||||
'doodstream': doodExtractor,
|
||||
'filemoon': filemoonExtractor,
|
||||
'luluvdo': luluvdoExtractor,
|
||||
'mixdrop': mixdropExtractor,
|
||||
'mp4upload': mp4UploadExtractor,
|
||||
'okru': okruExtractor,
|
||||
@@ -646,6 +661,10 @@ async function m3u8Extractor(url, headers = null) {
|
||||
const res = await new Client().get(url, headers);
|
||||
const text = res.body;
|
||||
|
||||
if (res.statusCode != 200) {
|
||||
return [];
|
||||
}
|
||||
|
||||
// collect media
|
||||
for (const match of text.matchAll(/#EXT-X-MEDIA:(.*)/g)) {
|
||||
const info = match[1], medium = {};
|
||||
|
||||
@@ -6,7 +6,7 @@ const mangayomiSources = [{
|
||||
"iconUrl": "https://cdn.jkanime.net/logo_jk.png",
|
||||
"typeSource": "single",
|
||||
"isManga": false,
|
||||
"version": "0.1.12",
|
||||
"version": "0.1.13",
|
||||
"dateFormat": "",
|
||||
"dateFormatLocale": "",
|
||||
"pkgPath": "anime/src/es/jkanime.js"
|
||||
@@ -388,7 +388,7 @@ class DefaultExtension extends MProvider {
|
||||
|
||||
/***************************************************************************************************
|
||||
*
|
||||
* mangayomi-js-helpers v1.1
|
||||
* mangayomi-js-helpers v1.2
|
||||
*
|
||||
* # Video Extractors
|
||||
* - vidGuardExtractor
|
||||
@@ -400,6 +400,7 @@ class DefaultExtension extends MProvider {
|
||||
* - filemoonExtractor
|
||||
* - mixdropExtractor
|
||||
* - speedfilesExtractor
|
||||
* - luluvdoExtractor
|
||||
* - burstcloudExtractor (not working, see description)
|
||||
*
|
||||
* # Video Extractor Wrappers
|
||||
@@ -526,15 +527,20 @@ async function vidHideExtractor(url) {
|
||||
}
|
||||
|
||||
async function filemoonExtractor(url, headers) {
|
||||
headers = headers ?? {};
|
||||
headers['User-Agent'] = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36';
|
||||
delete headers['user-agent'];
|
||||
|
||||
let res = await new Client().get(url, headers);
|
||||
const src = res.body.match(/iframe src="(.*?)"/)?.[1];
|
||||
if (src) {
|
||||
res = await new Client().get(src, {
|
||||
'Referer': url,
|
||||
'Accept-Language': 'de,en-US;q=0.7,en;q=0.3'
|
||||
'Accept-Language': 'de,en-US;q=0.7,en;q=0.3',
|
||||
'User-Agent': headers['User-Agent']
|
||||
});
|
||||
}
|
||||
return await jwplayerExtractor(res.body);
|
||||
return await jwplayerExtractor(res.body, headers);
|
||||
}
|
||||
|
||||
async function mixdropExtractor(url) {
|
||||
@@ -589,6 +595,14 @@ async function speedfilesExtractor(url) {
|
||||
return [{url: videoUrl, originalUrl: videoUrl, quality: '', headers: null}];
|
||||
}
|
||||
|
||||
async function luluvdoExtractor(url) {
|
||||
const client = new Client();
|
||||
const match = url.match(/(.*?:\/\/.*?)\/.*\/(.*)/);
|
||||
const headers = {'user-agent': 'Mangayomi'};
|
||||
const res = await client.get(`${match[1]}/dl?op=embed&file_code=${match[2]}`, headers);
|
||||
return await jwplayerExtractor(res.body, headers);
|
||||
}
|
||||
|
||||
/** Does not work: Client always sets 'charset=utf-8' in Content-Type. */
|
||||
async function burstcloudExtractor(url) {
|
||||
let client = new Client();
|
||||
@@ -690,6 +704,7 @@ extractAny.methods = {
|
||||
'burstcloud': burstcloudExtractor,
|
||||
'doodstream': doodExtractor,
|
||||
'filemoon': filemoonExtractor,
|
||||
'luluvdo': luluvdoExtractor,
|
||||
'mixdrop': mixdropExtractor,
|
||||
'mp4upload': mp4UploadExtractor,
|
||||
'okru': okruExtractor,
|
||||
@@ -741,6 +756,10 @@ async function m3u8Extractor(url, headers = null) {
|
||||
const res = await new Client().get(url, headers);
|
||||
const text = res.body;
|
||||
|
||||
if (res.statusCode != 200) {
|
||||
return [];
|
||||
}
|
||||
|
||||
// collect media
|
||||
for (const match of text.matchAll(/#EXT-X-MEDIA:(.*)/g)) {
|
||||
const info = match[1], medium = {};
|
||||
|
||||
@@ -6,7 +6,7 @@ const mangayomiSources = [{
|
||||
"iconUrl": "https://tioanime.com/assets/img/tio_fb.jpg",
|
||||
"typeSource": "single",
|
||||
"isManga": false,
|
||||
"version": "0.1.11",
|
||||
"version": "0.1.12",
|
||||
"dateFormat": "",
|
||||
"dateFormatLocale": "",
|
||||
"pkgPath": "anime/src/es/tioanime.js"
|
||||
@@ -158,7 +158,7 @@ class DefaultExtension extends MProvider {
|
||||
|
||||
/***************************************************************************************************
|
||||
*
|
||||
* mangayomi-js-helpers v1.1
|
||||
* mangayomi-js-helpers v1.2
|
||||
*
|
||||
* # Video Extractors
|
||||
* - vidGuardExtractor
|
||||
@@ -170,6 +170,7 @@ class DefaultExtension extends MProvider {
|
||||
* - filemoonExtractor
|
||||
* - mixdropExtractor
|
||||
* - speedfilesExtractor
|
||||
* - luluvdoExtractor
|
||||
* - burstcloudExtractor (not working, see description)
|
||||
*
|
||||
* # Video Extractor Wrappers
|
||||
@@ -296,15 +297,20 @@ async function vidHideExtractor(url) {
|
||||
}
|
||||
|
||||
async function filemoonExtractor(url, headers) {
|
||||
headers = headers ?? {};
|
||||
headers['User-Agent'] = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36';
|
||||
delete headers['user-agent'];
|
||||
|
||||
let res = await new Client().get(url, headers);
|
||||
const src = res.body.match(/iframe src="(.*?)"/)?.[1];
|
||||
if (src) {
|
||||
res = await new Client().get(src, {
|
||||
'Referer': url,
|
||||
'Accept-Language': 'de,en-US;q=0.7,en;q=0.3'
|
||||
'Accept-Language': 'de,en-US;q=0.7,en;q=0.3',
|
||||
'User-Agent': headers['User-Agent']
|
||||
});
|
||||
}
|
||||
return await jwplayerExtractor(res.body);
|
||||
return await jwplayerExtractor(res.body, headers);
|
||||
}
|
||||
|
||||
async function mixdropExtractor(url) {
|
||||
@@ -359,6 +365,14 @@ async function speedfilesExtractor(url) {
|
||||
return [{url: videoUrl, originalUrl: videoUrl, quality: '', headers: null}];
|
||||
}
|
||||
|
||||
async function luluvdoExtractor(url) {
|
||||
const client = new Client();
|
||||
const match = url.match(/(.*?:\/\/.*?)\/.*\/(.*)/);
|
||||
const headers = {'user-agent': 'Mangayomi'};
|
||||
const res = await client.get(`${match[1]}/dl?op=embed&file_code=${match[2]}`, headers);
|
||||
return await jwplayerExtractor(res.body, headers);
|
||||
}
|
||||
|
||||
/** Does not work: Client always sets 'charset=utf-8' in Content-Type. */
|
||||
async function burstcloudExtractor(url) {
|
||||
let client = new Client();
|
||||
@@ -460,6 +474,7 @@ extractAny.methods = {
|
||||
'burstcloud': burstcloudExtractor,
|
||||
'doodstream': doodExtractor,
|
||||
'filemoon': filemoonExtractor,
|
||||
'luluvdo': luluvdoExtractor,
|
||||
'mixdrop': mixdropExtractor,
|
||||
'mp4upload': mp4UploadExtractor,
|
||||
'okru': okruExtractor,
|
||||
@@ -511,6 +526,10 @@ async function m3u8Extractor(url, headers = null) {
|
||||
const res = await new Client().get(url, headers);
|
||||
const text = res.body;
|
||||
|
||||
if (res.statusCode != 200) {
|
||||
return [];
|
||||
}
|
||||
|
||||
// collect media
|
||||
for (const match of text.matchAll(/#EXT-X-MEDIA:(.*)/g)) {
|
||||
const info = match[1], medium = {};
|
||||
|
||||
@@ -6,7 +6,7 @@ const mangayomiSources = [{
|
||||
"iconUrl": "https://i.postimg.cc/RFRGfBvP/FVLyB1I.png",
|
||||
"typeSource": "single",
|
||||
"isManga": false,
|
||||
"version": "0.0.11",
|
||||
"version": "0.0.12",
|
||||
"dateFormat": "",
|
||||
"dateFormatLocale": "",
|
||||
"pkgPath": "anime/src/it/animeworld.js"
|
||||
@@ -314,7 +314,7 @@ class DefaultExtension extends MProvider {
|
||||
|
||||
/***************************************************************************************************
|
||||
*
|
||||
* mangayomi-js-helpers v1.1
|
||||
* mangayomi-js-helpers v1.2
|
||||
*
|
||||
* # Video Extractors
|
||||
* - vidGuardExtractor
|
||||
@@ -326,6 +326,7 @@ class DefaultExtension extends MProvider {
|
||||
* - filemoonExtractor
|
||||
* - mixdropExtractor
|
||||
* - speedfilesExtractor
|
||||
* - luluvdoExtractor
|
||||
* - burstcloudExtractor (not working, see description)
|
||||
*
|
||||
* # Video Extractor Wrappers
|
||||
@@ -452,15 +453,20 @@ async function vidHideExtractor(url) {
|
||||
}
|
||||
|
||||
async function filemoonExtractor(url, headers) {
|
||||
headers = headers ?? {};
|
||||
headers['User-Agent'] = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36';
|
||||
delete headers['user-agent'];
|
||||
|
||||
let res = await new Client().get(url, headers);
|
||||
const src = res.body.match(/iframe src="(.*?)"/)?.[1];
|
||||
if (src) {
|
||||
res = await new Client().get(src, {
|
||||
'Referer': url,
|
||||
'Accept-Language': 'de,en-US;q=0.7,en;q=0.3'
|
||||
'Accept-Language': 'de,en-US;q=0.7,en;q=0.3',
|
||||
'User-Agent': headers['User-Agent']
|
||||
});
|
||||
}
|
||||
return await jwplayerExtractor(res.body);
|
||||
return await jwplayerExtractor(res.body, headers);
|
||||
}
|
||||
|
||||
async function mixdropExtractor(url) {
|
||||
@@ -515,6 +521,14 @@ async function speedfilesExtractor(url) {
|
||||
return [{url: videoUrl, originalUrl: videoUrl, quality: '', headers: null}];
|
||||
}
|
||||
|
||||
async function luluvdoExtractor(url) {
|
||||
const client = new Client();
|
||||
const match = url.match(/(.*?:\/\/.*?)\/.*\/(.*)/);
|
||||
const headers = {'user-agent': 'Mangayomi'};
|
||||
const res = await client.get(`${match[1]}/dl?op=embed&file_code=${match[2]}`, headers);
|
||||
return await jwplayerExtractor(res.body, headers);
|
||||
}
|
||||
|
||||
/** Does not work: Client always sets 'charset=utf-8' in Content-Type. */
|
||||
async function burstcloudExtractor(url) {
|
||||
let client = new Client();
|
||||
@@ -616,6 +630,7 @@ extractAny.methods = {
|
||||
'burstcloud': burstcloudExtractor,
|
||||
'doodstream': doodExtractor,
|
||||
'filemoon': filemoonExtractor,
|
||||
'luluvdo': luluvdoExtractor,
|
||||
'mixdrop': mixdropExtractor,
|
||||
'mp4upload': mp4UploadExtractor,
|
||||
'okru': okruExtractor,
|
||||
@@ -667,6 +682,10 @@ async function m3u8Extractor(url, headers = null) {
|
||||
const res = await new Client().get(url, headers);
|
||||
const text = res.body;
|
||||
|
||||
if (res.statusCode != 200) {
|
||||
return [];
|
||||
}
|
||||
|
||||
// collect media
|
||||
for (const match of text.matchAll(/#EXT-X-MEDIA:(.*)/g)) {
|
||||
const info = match[1], medium = {};
|
||||
|
||||
Reference in New Issue
Block a user