From 8fb33208687208534b3ce5783299cc278883ba50 Mon Sep 17 00:00:00 2001 From: WebStreamr <210764791+webstreamr@users.noreply.github.com> Date: Tue, 7 Oct 2025 13:47:56 +0000 Subject: [PATCH] perf(extractor): do not guess resolution via MFP playlist for Voe --- src/extractor/Voe.test.ts | 4 + src/extractor/Voe.ts | 13 +- ...tps:jilliandescribecompany.comc2yxvit4f6bz | 514 +++++++++++++ ...tps:jilliandescribecompany.comea21l02gcygw | 691 +++++++++++++++++ ...ps:jilliandescribecompany.comec2yxvit4f6bz | 71 -- ...ps:jilliandescribecompany.comeea21l02gcygw | 204 ------ ...tps:jilliandescribecompany.comqqfyi04w52mj | 692 ++++++++++++++++++ ....test.org-f60f1c6427ad36dfca849557f64c724f | 4 - ...ndescribecompany.compercent2Fea21l02gcygw} | 0 ...andescribecompany.compercent2Fqqfyi04w52mj | 1 + ...ec2yxvit4f6bz => https:voe.sxc2yxvit4f6bz} | 4 +- src/extractor/__snapshots__/Voe.test.ts.snap | 18 + 12 files changed, 1929 insertions(+), 287 deletions(-) create mode 100644 src/extractor/__fixtures__/Voe/https:jilliandescribecompany.comc2yxvit4f6bz create mode 100644 src/extractor/__fixtures__/Voe/https:jilliandescribecompany.comea21l02gcygw delete mode 100644 src/extractor/__fixtures__/Voe/https:jilliandescribecompany.comec2yxvit4f6bz delete mode 100644 src/extractor/__fixtures__/Voe/https:jilliandescribecompany.comeea21l02gcygw create mode 100644 src/extractor/__fixtures__/Voe/https:jilliandescribecompany.comqqfyi04w52mj delete mode 100644 src/extractor/__fixtures__/Voe/https:mediaflow.test.org-f60f1c6427ad36dfca849557f64c724f rename src/extractor/__fixtures__/Voe/{https:mediaflow.test.org-69b2d6ce0f425db5b27748c3e67b81eb => https:mediaflow.test.orgextractorvideohostVoeandapi_passwordtestanddhttpspercent3Apercent2Fpercent2Fjilliandescribecompany.compercent2Fea21l02gcygwandh_refererhttpspercent3Apercent2Fpercent2Fjilliandescribecompany.compercent2Fea21l02gcygw} (100%) create mode 100644 src/extractor/__fixtures__/Voe/https:mediaflow.test.orgextractorvideohostVoeandapi_passwordtestanddhttpspercent3Apercent2Fpercent2Fjilliandescribecompany.compercent2Fqqfyi04w52mjandh_refererhttpspercent3Apercent2Fpercent2Fjilliandescribecompany.compercent2Fqqfyi04w52mj rename src/extractor/__fixtures__/Voe/{https:voe.sxec2yxvit4f6bz => https:voe.sxc2yxvit4f6bz} (93%) diff --git a/src/extractor/Voe.test.ts b/src/extractor/Voe.test.ts index bf268ba..74dd956 100644 --- a/src/extractor/Voe.test.ts +++ b/src/extractor/Voe.test.ts @@ -14,6 +14,10 @@ describe('Voe', () => { expect(await extractorRegistry.handle(ctx, new URL('https://jilliandescribecompany.com/e/ea21l02gcygw'))).toMatchSnapshot(); }); + test('premium only without resolution', async () => { + expect(await extractorRegistry.handle(ctx, new URL('https://jilliandescribecompany.com/qqfyi04w52mj'))).toMatchSnapshot(); + }); + test('encoding error', async () => { expect(await extractorRegistry.handle(ctx, new URL('https://voe.sx/e/c2yxvit4f6bz'))).toMatchSnapshot(); }); diff --git a/src/extractor/Voe.ts b/src/extractor/Voe.ts index 12e779b..d699138 100644 --- a/src/extractor/Voe.ts +++ b/src/extractor/Voe.ts @@ -1,10 +1,9 @@ +import bytes from 'bytes'; import * as cheerio from 'cheerio'; import { NotFoundError } from '../error'; import { Context, Format, Meta, UrlResult } from '../types'; import { buildMediaFlowProxyExtractorStreamUrl, - guessHeightFromPlaylist, - MEDIAFLOW_DEFAULT_INIT, supportsMediaFlowProxy, } from '../utils'; import { Extractor } from './Extractor'; @@ -114,9 +113,7 @@ export class Voe extends Extractor { } public override normalize(url: URL): URL { - const videoId = url.pathname.split('/').slice(-1)[0] as string; - - return new URL(`/e/${videoId}`, url); + return new URL(`/${url.pathname.split('/').slice(-1)[0]}`, url); } protected async extractInternal(ctx: Context, url: URL, meta: Meta): Promise { @@ -136,6 +133,9 @@ export class Voe extends Extractor { const $ = cheerio.load(html); const title = $('meta[name="description"]').attr('content')?.trim().replace(/^Watch /, '').replace(/ at VOE$/, '').trim(); + const sizeMatch = html.matchAll(/[\d.]+ ?[GM]B/g).toArray().at(-1); + const heightMatch = html.match(/(\d{3,})p<\/b>/); + const playlistUrl = await buildMediaFlowProxyExtractorStreamUrl(ctx, this.fetcher, 'Voe', url, headers); return [ @@ -147,8 +147,9 @@ export class Voe extends Extractor { ttl: this.ttl, meta: { ...meta, - height: await guessHeightFromPlaylist(ctx, this.fetcher, playlistUrl, MEDIAFLOW_DEFAULT_INIT), title, + ...(sizeMatch && { bytes: bytes.parse(sizeMatch[0] as string) as number }), + ...(heightMatch && { height: parseInt(heightMatch[1] as string) }), }, }, ]; diff --git a/src/extractor/__fixtures__/Voe/https:jilliandescribecompany.comc2yxvit4f6bz b/src/extractor/__fixtures__/Voe/https:jilliandescribecompany.comc2yxvit4f6bz new file mode 100644 index 0000000..658872b --- /dev/null +++ b/src/extractor/__fixtures__/Voe/https:jilliandescribecompany.comc2yxvit4f6bz @@ -0,0 +1,514 @@ + + + + + Watch Une bataille après l'autre (2025).mp4 - VOE | Content Delivery Network (CDN) & Video Cloud + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+
+
+
+
+ +

Une bataille après l'autre (2025).mp4

+
+
+
+ + + + An error occurred during encoding. +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/extractor/__fixtures__/Voe/https:jilliandescribecompany.comea21l02gcygw b/src/extractor/__fixtures__/Voe/https:jilliandescribecompany.comea21l02gcygw new file mode 100644 index 0000000..8a55aff --- /dev/null +++ b/src/extractor/__fixtures__/Voe/https:jilliandescribecompany.comea21l02gcygw @@ -0,0 +1,691 @@ + + + + + Watch Superman.2025.2160p.WEB-DL.DV.HDR10Plus.X265.DDP5.1.Atmos-YIN.mp4 - VOE | Content Delivery Network (CDN) & Video Cloud + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+
+
+
+
+ +

Superman.2025.2160p.WEB-DL.DV.HDR10Plus.X265.DDP5.1.Atmos-YIN.mp4

+
+
+ + + + + + + + +
+
+
+
+
+
+ +
+ + + + + +
+
+
+
+ +
+
+
+
+

File Details

+
+
+
+
Name
+
Superman.2025.2160p.WEB-DL.DV.HDR10Plus.X265.DDP5.1.Atmos-YIN.mp4
+
+
+
Size
+
+
+ 720p - 1.12 GB +
+
+
+
+
Delivery Speed
+
Network Cache enabled
+
+
+
Length
+
02:09:22
+
+
+
File Download
+
+ The file owner has disabled the download.
+
+
+
HTML-Embed
+
+
HTML-Embed
+ +
+
+
+
Transport Security
+
TLS 1.3 Encryption
+
+ +
+ The following policies applies: Terms of Use, Privacy Policy. report abuse + + + + + + + + + + + + + + +
+ + + + + + + diff --git a/src/extractor/__fixtures__/Voe/https:jilliandescribecompany.comec2yxvit4f6bz b/src/extractor/__fixtures__/Voe/https:jilliandescribecompany.comec2yxvit4f6bz deleted file mode 100644 index dd8af9e..0000000 --- a/src/extractor/__fixtures__/Voe/https:jilliandescribecompany.comec2yxvit4f6bz +++ /dev/null @@ -1,71 +0,0 @@ - - - - - Watch Une bataille après l'autre (2025).mp4 - VOE | Content Delivery Network (CDN) & Video Cloud - - - - - - - - - - - - - - - - - - - -
- - - - An error occurred during encoding. -
- - - - - - - - - - - - - - - - - diff --git a/src/extractor/__fixtures__/Voe/https:jilliandescribecompany.comeea21l02gcygw b/src/extractor/__fixtures__/Voe/https:jilliandescribecompany.comeea21l02gcygw deleted file mode 100644 index 1a08ec1..0000000 --- a/src/extractor/__fixtures__/Voe/https:jilliandescribecompany.comeea21l02gcygw +++ /dev/null @@ -1,204 +0,0 @@ - - - - - Watch Superman.2025.2160p.WEB-DL.DV.HDR10Plus.X265.DDP5.1.Atmos-YIN.mp4 - VOE | Content Delivery Network (CDN) & Video Cloud - - - - - - - - - - - - - - - - - - - -
- - - - - - - - -
-
-
-
-
-
- -
- - - - - -
- - - - - - - - - - - - - - - - - diff --git a/src/extractor/__fixtures__/Voe/https:jilliandescribecompany.comqqfyi04w52mj b/src/extractor/__fixtures__/Voe/https:jilliandescribecompany.comqqfyi04w52mj new file mode 100644 index 0000000..611d581 --- /dev/null +++ b/src/extractor/__fixtures__/Voe/https:jilliandescribecompany.comqqfyi04w52mj @@ -0,0 +1,692 @@ + + + + + Watch 268836--21ba9fb2-97f9-4566-b5eb-3d9cef7674cf--zrxn--2352322-voesx.mp4 - VOE | Content Delivery Network (CDN) & Video Cloud + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+
+
+
+
+ +

268836--21ba9fb2-97f9-4566-b5eb-3d9cef7674cf--zrxn--2352322-voesx.mp4

+
+
+ + + + + + + + +
+
+
+
+
+
+ +
+ + + + + +
+
+
+
+ +
+
+
+
+

File Details

+
+
+
+
Name
+
268836--21ba9fb2-97f9-4566-b5eb-3d9cef7674cf--zrxn--2352322-voesx.mp4
+
+
+
Size
+
+
+ 346.39 MB + Premium only +
+
+
+
+
Delivery Speed
+
regular
+
+
+
Length
+
01:29:58
+
+
+
File Download
+ +
+
+
HTML-Embed
+
+
HTML-Embed
+ +
+
+
+
Transport Security
+
TLS 1.3 Encryption
+
+ +
+ The following policies applies: Terms of Use, Privacy Policy. report abuse + + + + + + + + + + + + + + +
+ + + + + + + diff --git a/src/extractor/__fixtures__/Voe/https:mediaflow.test.org-f60f1c6427ad36dfca849557f64c724f b/src/extractor/__fixtures__/Voe/https:mediaflow.test.org-f60f1c6427ad36dfca849557f64c724f deleted file mode 100644 index b129838..0000000 --- a/src/extractor/__fixtures__/Voe/https:mediaflow.test.org-f60f1c6427ad36dfca849557f64c724f +++ /dev/null @@ -1,4 +0,0 @@ -#EXTM3U -#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1186371,RESOLUTION=1368x720,FRAME-RATE=24.000,CODECS="avc1.640020,mp4a.40.2",VIDEO-RANGE=PQ -https://mediaflow.test.org/proxy/hls/manifest.m3u8?api_password=test&h_user-agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F136.0.0.0+Safari%2F537.36&h_referer=https%3A%2F%2Fjilliandescribecompany.com%2Fe%2Fea21l02gcygw&d=https%3A%2F%2Fcdn-kuc3ehpz4wnczfyz.orbitcache.com%2Fengine%2Fhls2-c%2F01%2F15242%2Fea21l02gcygw_%2Cn%2C.urlset%2Findex-v1-a1.m3u8%3Ft%3D3iMAKoJqij6nC4HDamYxtDB75a_-AlG_wD1demRBo0I%26s%3D1759754183%26e%3D14400%26f%3D76213694%26node%3DFPYruvgfgORaUYuYfpByMgjFbC8X%2FHWKW1utbUQQRyQ%3D%26i%3D104.28%26sp%3D2500%26asn%3D13335%26q%3Dn%26rq%3DzKNpONzQJHzTeXTzr0V2M9V4DUnzwX9C8hTNxrUW -#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=25403,RESOLUTION=1368x720,CODECS="avc1.640020",URI="https://mediaflow.test.org/proxy/hls/manifest.m3u8?api_password=test&h_user-agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F136.0.0.0+Safari%2F537.36&h_referer=https%3A%2F%2Fjilliandescribecompany.com%2Fe%2Fea21l02gcygw&d=https%3A%2F%2Fcdn-kuc3ehpz4wnczfyz.orbitcache.com%2Fengine%2Fhls2-c%2F01%2F15242%2Fea21l02gcygw_%2Cn%2C.urlset%2Fiframes-v1-a1.m3u8%3Ft%3D3iMAKoJqij6nC4HDamYxtDB75a_-AlG_wD1demRBo0I%26s%3D1759754183%26e%3D14400%26f%3D76213694%26node%3DFPYruvgfgORaUYuYfpByMgjFbC8X%2FHWKW1utbUQQRyQ%3D%26i%3D104.28%26sp%3D2500%26asn%3D13335%26q%3Dn%26rq%3DzKNpONzQJHzTeXTzr0V2M9V4DUnzwX9C8hTNxrUW",VIDEO-RANGE=PQ diff --git a/src/extractor/__fixtures__/Voe/https:mediaflow.test.org-69b2d6ce0f425db5b27748c3e67b81eb b/src/extractor/__fixtures__/Voe/https:mediaflow.test.orgextractorvideohostVoeandapi_passwordtestanddhttpspercent3Apercent2Fpercent2Fjilliandescribecompany.compercent2Fea21l02gcygwandh_refererhttpspercent3Apercent2Fpercent2Fjilliandescribecompany.compercent2Fea21l02gcygw similarity index 100% rename from src/extractor/__fixtures__/Voe/https:mediaflow.test.org-69b2d6ce0f425db5b27748c3e67b81eb rename to src/extractor/__fixtures__/Voe/https:mediaflow.test.orgextractorvideohostVoeandapi_passwordtestanddhttpspercent3Apercent2Fpercent2Fjilliandescribecompany.compercent2Fea21l02gcygwandh_refererhttpspercent3Apercent2Fpercent2Fjilliandescribecompany.compercent2Fea21l02gcygw diff --git a/src/extractor/__fixtures__/Voe/https:mediaflow.test.orgextractorvideohostVoeandapi_passwordtestanddhttpspercent3Apercent2Fpercent2Fjilliandescribecompany.compercent2Fqqfyi04w52mjandh_refererhttpspercent3Apercent2Fpercent2Fjilliandescribecompany.compercent2Fqqfyi04w52mj b/src/extractor/__fixtures__/Voe/https:mediaflow.test.orgextractorvideohostVoeandapi_passwordtestanddhttpspercent3Apercent2Fpercent2Fjilliandescribecompany.compercent2Fqqfyi04w52mjandh_refererhttpspercent3Apercent2Fpercent2Fjilliandescribecompany.compercent2Fqqfyi04w52mj new file mode 100644 index 0000000..d9c6b82 --- /dev/null +++ b/src/extractor/__fixtures__/Voe/https:mediaflow.test.orgextractorvideohostVoeandapi_passwordtestanddhttpspercent3Apercent2Fpercent2Fjilliandescribecompany.compercent2Fqqfyi04w52mjandh_refererhttpspercent3Apercent2Fpercent2Fjilliandescribecompany.compercent2Fqqfyi04w52mj @@ -0,0 +1 @@ +{"destination_url":"https://cdn-thhhlmzuxvpehc9r.orbitcache.com/engine/hls2-c/01/11526/qqfyi04w52mj_,l,.urlset/master.m3u8?t=g2zuS_OAHTtjrVe0bHp2xYcX7PpDxg8ebRIHTmF3H1c&s=1759861731&e=14400&f=57634053&node=UOx5276IumOH4BADikx4rlHC+ibdAWZ+mo07sx3WfaU=&i=104.28&sp=2500&asn=13335&q=l&rq=FxkyWdISXylA0UaLSPNcXWkDrksjs0pkAzy0GvIS","request_headers":{"user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36","referer":"https://jilliandescribecompany.com/qqfyi04w52mj"},"mediaflow_proxy_url":"https://mediaflow.test.org/proxy/hls/manifest.m3u8","query_params":{"api_password":"test"}} diff --git a/src/extractor/__fixtures__/Voe/https:voe.sxec2yxvit4f6bz b/src/extractor/__fixtures__/Voe/https:voe.sxc2yxvit4f6bz similarity index 93% rename from src/extractor/__fixtures__/Voe/https:voe.sxec2yxvit4f6bz rename to src/extractor/__fixtures__/Voe/https:voe.sxc2yxvit4f6bz index ef365f5..9d3acdc 100644 --- a/src/extractor/__fixtures__/Voe/https:voe.sxec2yxvit4f6bz +++ b/src/extractor/__fixtures__/Voe/https:voe.sxc2yxvit4f6bz @@ -13,10 +13,10 @@ currentUrl.searchParams.set('permanentToken', permanentToken); window.location.href = currentUrl.toString(); } else { - window.location.href = 'https://jilliandescribecompany.com/e/c2yxvit4f6bz'; + window.location.href = 'https://jilliandescribecompany.com/c2yxvit4f6bz'; } } else { - window.location.href = 'https://jilliandescribecompany.com/e/c2yxvit4f6bz'; + window.location.href = 'https://jilliandescribecompany.com/c2yxvit4f6bz'; } diff --git a/src/extractor/__snapshots__/Voe.test.ts.snap b/src/extractor/__snapshots__/Voe.test.ts.snap index 56c54c8..c3da142 100644 --- a/src/extractor/__snapshots__/Voe.test.ts.snap +++ b/src/extractor/__snapshots__/Voe.test.ts.snap @@ -8,6 +8,7 @@ exports[`Voe jilliandescribecompany 1`] = ` "format": "hls", "label": "VOE (via MediaFlow Proxy)", "meta": { + "bytes": 1202590842, "countryCodes": [], "height": 720, "title": "Superman.2025.2160p.WEB-DL.DV.HDR10Plus.X265.DDP5.1.Atmos-YIN.mp4", @@ -18,3 +19,20 @@ exports[`Voe jilliandescribecompany 1`] = ` }, ] `; + +exports[`Voe premium only without resolution 1`] = ` +[ + { + "format": "hls", + "label": "VOE (via MediaFlow Proxy)", + "meta": { + "bytes": 363216240, + "countryCodes": [], + "title": "268836--21ba9fb2-97f9-4566-b5eb-3d9cef7674cf--zrxn--2352322-voesx.mp4", + }, + "sourceId": "voe_", + "ttl": 900000, + "url": "https://mediaflow.test.org/proxy/hls/manifest.m3u8?api_password=test&h_user-agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F136.0.0.0+Safari%2F537.36&h_referer=https%3A%2F%2Fjilliandescribecompany.com%2Fqqfyi04w52mj&d=https%3A%2F%2Fcdn-thhhlmzuxvpehc9r.orbitcache.com%2Fengine%2Fhls2-c%2F01%2F11526%2Fqqfyi04w52mj_%2Cl%2C.urlset%2Fmaster.m3u8%3Ft%3Dg2zuS_OAHTtjrVe0bHp2xYcX7PpDxg8ebRIHTmF3H1c%26s%3D1759861731%26e%3D14400%26f%3D57634053%26node%3DUOx5276IumOH4BADikx4rlHC%2BibdAWZ%2Bmo07sx3WfaU%3D%26i%3D104.28%26sp%3D2500%26asn%3D13335%26q%3Dl%26rq%3DFxkyWdISXylA0UaLSPNcXWkDrksjs0pkAzy0GvIS", + }, +] +`;