Aniworld: New Host & Language preference filters + lib update

Aniworld:
- New Host: Luluvdo
- Language preference filters

Lib:
- New Host: Luluvdo
This commit is contained in:
RndDev123
2024-11-29 04:09:52 +01:00
parent 4a9f16c5ae
commit c2919d7298
5 changed files with 102 additions and 12 deletions

View File

@@ -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
@@ -515,6 +516,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 +625,7 @@ extractAny.methods = {
'burstcloud': burstcloudExtractor,
'doodstream': doodExtractor,
'filemoon': filemoonExtractor,
'luluvdo': luluvdoExtractor,
'mixdrop': mixdropExtractor,
'mp4upload': mp4UploadExtractor,
'okru': okruExtractor,
@@ -667,6 +677,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 = {};