diff --git a/src/extractor/Dropload.test.ts b/src/extractor/Dropload.test.ts
index ad28e55..b7687b2 100644
--- a/src/extractor/Dropload.test.ts
+++ b/src/extractor/Dropload.test.ts
@@ -14,6 +14,10 @@ describe('Dropload', () => {
expect(await extractorRegistry.handle(ctx, new URL('https://dropload.io/embed-lyo2h1snpe5c.html'))).toMatchSnapshot();
});
+ test('dropload unknown height and size', async () => {
+ expect(await extractorRegistry.handle(ctx, new URL('https://dropload.io/gf2apij3ql37'))).toMatchSnapshot();
+ });
+
test('file not found', async () => {
expect(await extractorRegistry.handle(ctx, new URL('https://dropload.io/asdfghijklmn.html'))).toMatchSnapshot();
});
diff --git a/src/extractor/Dropload.ts b/src/extractor/Dropload.ts
index 57d9d5e..43d2a5b 100644
--- a/src/extractor/Dropload.ts
+++ b/src/extractor/Dropload.ts
@@ -2,7 +2,7 @@ import bytes from 'bytes';
import * as cheerio from 'cheerio';
import { NotFoundError } from '../error';
import { Context, Format, Meta, UrlResult } from '../types';
-import { extractUrlFromPacked } from '../utils';
+import { extractUrlFromPacked, guessHeightFromPlaylist } from '../utils';
import { Extractor } from './Extractor';
export class Dropload extends Extractor {
@@ -27,25 +27,31 @@ export class Dropload extends Extractor {
throw new NotFoundError();
}
- const heightMatch = html.match(/\d{3,}x(\d{3,}),/) as string[];
+ const playlistUrl = extractUrlFromPacked(html, [/sources:\[{file:"(.*?)"/]);
- const sizeMatch = html.match(/([\d.]+ ?[GM]B)/) as string[];
+ const heightMatch = html.match(/\d{3,}x(\d{3,}),/);
+ const height = heightMatch
+ ? parseInt(heightMatch[1] as string)
+ : await guessHeightFromPlaylist(ctx, this.fetcher, playlistUrl);
+
+ const sizeMatch = html.match(/([\d.]+ ?[GM]B)/);
+ const size = sizeMatch ? bytes.parse(sizeMatch[1] as string) as number : undefined;
const $ = cheerio.load(html);
const title = $('.videoplayer h1').text().trim();
return [
{
- url: extractUrlFromPacked(html, [/sources:\[{file:"(.*?)"/]),
+ url: playlistUrl,
format: Format.hls,
label: this.label,
sourceId: `${this.id}_${meta.countryCodes?.join('_')}`,
ttl: this.ttl,
meta: {
...meta,
- bytes: bytes.parse(sizeMatch[1] as string) as number,
- height: parseInt(heightMatch[1] as string),
title,
+ ...(size && { bytes: size }),
+ ...(height && { height }),
},
},
];
diff --git a/src/extractor/__fixtures__/Dropload/https:dropload.iogf2apij3ql37 b/src/extractor/__fixtures__/Dropload/https:dropload.iogf2apij3ql37
new file mode 100644
index 0000000..baa87a3
--- /dev/null
+++ b/src/extractor/__fixtures__/Dropload/https:dropload.iogf2apij3ql37
@@ -0,0 +1,460 @@
+
+
+
+
+
+ Dropload - Revolution Video Hosting
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
The Lost Bus 2025 1080p WEBRip x265
+
+
+
+
+
+
+
+
+
+
+
+ on Oct 6, 2025
+
+
+
+
+
+
+
+
+ 02:09:46
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Share code
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/extractor/__fixtures__/Dropload/https:ds16.dropcdn.iohls20200314gf2apij3ql37_hmaster.m3u8tjq0VCV2dOyLIIH07IGIpzruCXvbfdVqzGLWfMeo00AMands1759845990ande14400andf1571895andsrvds3andi0.0andsp0andii2.184.0.222andp1ds3andp2ds3 b/src/extractor/__fixtures__/Dropload/https:ds16.dropcdn.iohls20200314gf2apij3ql37_hmaster.m3u8tjq0VCV2dOyLIIH07IGIpzruCXvbfdVqzGLWfMeo00AMands1759845990ande14400andf1571895andsrvds3andi0.0andsp0andii2.184.0.222andp1ds3andp2ds3
new file mode 100644
index 0000000..262e9d3
--- /dev/null
+++ b/src/extractor/__fixtures__/Dropload/https:ds16.dropcdn.iohls20200314gf2apij3ql37_hmaster.m3u8tjq0VCV2dOyLIIH07IGIpzruCXvbfdVqzGLWfMeo00AMands1759845990ande14400andf1571895andsrvds3andi0.0andsp0andii2.184.0.222andp1ds3andp2ds3
@@ -0,0 +1,5 @@
+#EXTM3U
+#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=3955353,RESOLUTION=1920x800,FRAME-RATE=23.974,CODECS="avc1.640028,mp4a.40.2",VIDEO-RANGE=SDR
+index-v1-a1.m3u8?t=jq0VCV2dOyLIIH07IGIpzruCXvbfdVqzGLWfMeo00AM&s=1759845990&e=14400&f=1571895&srv=ds3&i=0.0&sp=0&ii=2.184.0.222&p1=ds3&p2=ds3
+
+#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=68483,RESOLUTION=1920x800,CODECS="avc1.640028",URI="iframes-v1-a1.m3u8?t=jq0VCV2dOyLIIH07IGIpzruCXvbfdVqzGLWfMeo00AM&s=1759845990&e=14400&f=1571895&srv=ds3&i=0.0&sp=0&ii=2.184.0.222&p1=ds3&p2=ds3",VIDEO-RANGE=SDR
diff --git a/src/extractor/__snapshots__/Dropload.test.ts.snap b/src/extractor/__snapshots__/Dropload.test.ts.snap
index edb0474..22821e4 100644
--- a/src/extractor/__snapshots__/Dropload.test.ts.snap
+++ b/src/extractor/__snapshots__/Dropload.test.ts.snap
@@ -18,6 +18,23 @@ exports[`Dropload download URL 1`] = `
]
`;
+exports[`Dropload dropload unknown height and size 1`] = `
+[
+ {
+ "format": "hls",
+ "label": "Dropload",
+ "meta": {
+ "countryCodes": [],
+ "height": 800,
+ "title": "The Lost Bus 2025 1080p WEBRip x265",
+ },
+ "sourceId": "dropload_",
+ "ttl": 10800000,
+ "url": "https://ds16.dropcdn.io/hls2/02/00314/gf2apij3ql37_h/master.m3u8?t=jq0VCV2dOyLIIH07IGIpzruCXvbfdVqzGLWfMeo00AM&s=1759845990&e=14400&f=1571895&srv=ds3&i=0.0&sp=0&ii=2.184.0.222&p1=ds3&p2=ds3",
+ },
+]
+`;
+
exports[`Dropload dropload.io 1`] = `
[
{