From 69afcdcdb253e426585677a6ed357a02ee4691e8 Mon Sep 17 00:00:00 2001 From: WebStreamr <210764791+webstreamr@users.noreply.github.com> Date: Tue, 15 Jul 2025 20:59:08 +0000 Subject: [PATCH] chore(extractor): normalize Dropload download URLs --- src/extractor/Dropload.test.ts | 4 + src/extractor/Dropload.ts | 2 +- .../Dropload/https:dropload.ioxhcmgcc2txnv | 515 ++++++++++++++++++ .../__snapshots__/Dropload.test.ts.snap | 20 + 4 files changed, 540 insertions(+), 1 deletion(-) create mode 100644 src/extractor/__fixtures__/Dropload/https:dropload.ioxhcmgcc2txnv diff --git a/src/extractor/Dropload.test.ts b/src/extractor/Dropload.test.ts index 25a6cef..ce52d06 100644 --- a/src/extractor/Dropload.test.ts +++ b/src/extractor/Dropload.test.ts @@ -22,4 +22,8 @@ describe('Dropload', () => { test('processing / internal problem', async () => { expect(await extractorRegistry.handle(ctx, new URL('https://dropload.io/7xtxuac84xyh.html'), CountryCode.de)).toMatchSnapshot(); }); + + test('download URL', async () => { + expect(await extractorRegistry.handle(ctx, new URL('https://dropload.io/d/xhcmgcc2txnv'), CountryCode.en)).toMatchSnapshot(); + }); }); diff --git a/src/extractor/Dropload.ts b/src/extractor/Dropload.ts index eba8d22..3db503c 100644 --- a/src/extractor/Dropload.ts +++ b/src/extractor/Dropload.ts @@ -22,7 +22,7 @@ export class Dropload extends Extractor { return null !== url.host.match(/dropload/); } - public override readonly normalize = (url: URL): URL => new URL(url.href.replace('/e/', '/').replace('/embed-', '/')); + public override readonly normalize = (url: URL): URL => new URL(url.href.replace('/d/', '/').replace('/e/', '/').replace('/embed-', '/')); protected async extractInternal(ctx: Context, url: URL, countryCode: CountryCode): Promise { const html = await this.fetcher.text(ctx, url); diff --git a/src/extractor/__fixtures__/Dropload/https:dropload.ioxhcmgcc2txnv b/src/extractor/__fixtures__/Dropload/https:dropload.ioxhcmgcc2txnv new file mode 100644 index 0000000..0c908f6 --- /dev/null +++ b/src/extractor/__fixtures__/Dropload/https:dropload.ioxhcmgcc2txnv @@ -0,0 +1,515 @@ + + + + + + Dropload - Revolution Video Hosting + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ + + +
+
+ +
+ + + + +
+ +
+ + + + +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + +
+
+ +

[~Squid~Game~EnG~]~S03E01~720p~WebRip ~❤️GLD❤️~

+
+
+
+
+
+
+
+ + +
+ + on Jun 27, 2025 +
+ +
+ + +
+
+ + 00:57:13 +
+ +
+
+
+ + + +
+
+
+
+
+ +
+
+ +
+
+
+ + +
+
+ + + + +
+ +
+ + + + + + +
+
+ + +
+
+ + +
+
+
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + diff --git a/src/extractor/__snapshots__/Dropload.test.ts.snap b/src/extractor/__snapshots__/Dropload.test.ts.snap index 8083742..174e46c 100644 --- a/src/extractor/__snapshots__/Dropload.test.ts.snap +++ b/src/extractor/__snapshots__/Dropload.test.ts.snap @@ -1,5 +1,25 @@ // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing +exports[`Dropload download URL 1`] = ` +[ + { + "format": "hls", + "label": "Dropload", + "meta": { + "bytes": 333027737, + "countryCodes": [ + "en", + ], + "height": 720, + "title": "[~Squid~Game~EnG~]~S03E01~720p~WebRip ~❤️GLD❤️~", + }, + "sourceId": "dropload_en", + "ttl": 900000, + "url": "https://srv29.dropload.io/hls2/01/00305/xhcmgcc2txnv_h/master.m3u8?t=MBKiIoVlA42YcZEixT7ZR1xJA5qKhcKgBi84GPmyT7U&s=1752613129&e=14400&f=1526758&i=0.0&sp=0&ii=130.61.236.204", + }, +] +`; + exports[`Dropload dropload.io 1`] = ` [ {