fix(extractor): use Dropload hosting URL origin as Referer

This commit is contained in:
WebStreamr 2026-03-06 13:00:50 +00:00
parent 4e436509bf
commit 423abf2479
No known key found for this signature in database
3 changed files with 10 additions and 9 deletions

View file

@ -13,7 +13,7 @@ export class Dropload extends Extractor {
public override readonly ttl: number = 10800000; // 3h
public supports(_ctx: Context, url: URL): boolean {
return null !== url.host.match(/dropload/);
return null !== url.host.match(/dropload|dr0pstream/);
}
public override readonly normalize = (url: URL): URL => new URL(url.href.replace('/d/', '/').replace('/e/', '/').replace('/embed-', '/'));
@ -28,7 +28,8 @@ export class Dropload extends Extractor {
}
const playlistUrl = extractUrlFromPacked(html, [/sources:\[{file:"(.*?)"/]);
const playlistHeaders = { Referer: url.origin };
const hostUrlMatch = html.match(/(https:\/\/.+?\/)player/) as string[];
const playlistHeaders = { Referer: hostUrlMatch[1] as string };
const heightMatch = html.match(/\d{3,}x(\d{3,}),/);
const height = heightMatch

View file

@ -12,7 +12,7 @@ exports[`Dropload download URL 1`] = `
"title": "[~Squid~Game~EnG~]~S03E01~720p~WebRip ~❤GLD❤~",
},
"requestHeaders": {
"Referer": "https://dropload.io",
"Referer": "https://dropload.io/",
},
"ttl": 10800000,
"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",
@ -31,7 +31,7 @@ exports[`Dropload dropload unknown height and size 1`] = `
"title": "The Lost Bus 2025 1080p WEBRip x265",
},
"requestHeaders": {
"Referer": "https://dropload.io",
"Referer": "https://dropload.tv/",
},
"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",
@ -51,7 +51,7 @@ exports[`Dropload dropload.io 1`] = `
"title": "des-teufels-bad-2024",
},
"requestHeaders": {
"Referer": "https://dropload.io",
"Referer": "https://dropload.io/",
},
"ttl": 10800000,
"url": "https://srv34.dropload.io/hls2/01/00197/lyo2h1snpe5c_h/master.m3u8?t=ESjD9Le53ttKN2JPyxrhLUqTebDZvx3vcQUlNgP6Vko&s=1749845553&e=14400&f=987607&srv=srv27&i=0.0&sp=0&ii=50.99.15.93&p1=srv27&p2=srv27",

View file

@ -236,7 +236,7 @@ exports[`resolve returns sorted results 1`] = `
"notWebReady": true,
"proxyHeaders": {
"request": {
"Referer": "https://dropload.io",
"Referer": "https://dropload.io/",
},
},
"videoSize": 1395864371,
@ -252,7 +252,7 @@ exports[`resolve returns sorted results 1`] = `
"notWebReady": true,
"proxyHeaders": {
"request": {
"Referer": "https://dropload.io",
"Referer": "https://dropload.io/",
},
},
"videoSize": 1181116006,
@ -295,7 +295,7 @@ exports[`resolve returns sorted results 2`] = `
"notWebReady": true,
"proxyHeaders": {
"request": {
"Referer": "https://dropload.io",
"Referer": "https://dropload.io/",
},
},
"videoSize": 1395864371,
@ -311,7 +311,7 @@ exports[`resolve returns sorted results 2`] = `
"notWebReady": true,
"proxyHeaders": {
"request": {
"Referer": "https://dropload.io",
"Referer": "https://dropload.io/",
},
},
"videoSize": 1181116006,