From 3e964f28ff3f9a0acbc929e648f7531fbeb40468 Mon Sep 17 00:00:00 2001 From: WebStreamr <210764791+webstreamr@users.noreply.github.com> Date: Wed, 13 Aug 2025 09:59:34 +0000 Subject: [PATCH] refactor(extractor): clean-up DoodStream sightly --- src/extractor/DoodStream.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/extractor/DoodStream.ts b/src/extractor/DoodStream.ts index d2fea55..8b5e1d1 100644 --- a/src/extractor/DoodStream.ts +++ b/src/extractor/DoodStream.ts @@ -30,7 +30,7 @@ export class DoodStream extends Extractor { }; protected async extractInternal(ctx: Context, url: URL, countryCode: CountryCode): Promise { - const html = await this.fetcher.text(ctx, new URL(url)); + const html = await this.fetcher.text(ctx, url); const passMd5Match = html.match(/\/pass_md5\/[\w-]+\/([\w-]+)/); if (!passMd5Match) { @@ -39,7 +39,7 @@ export class DoodStream extends Extractor { const token = passMd5Match[1] as string; - const baseUrl = await this.fetcher.text(ctx, new URL(`http://dood.to${passMd5Match[0]}`)); + const baseUrl = await this.fetcher.text(ctx, new URL(passMd5Match[0], url.origin)); const $ = cheerio.load(html); const title = $('title').text().trim().replace(/ - DoodStream$/, '').trim();