diff --git a/src/extractor/Dropload.ts b/src/extractor/Dropload.ts index 919e89f..a98a71a 100644 --- a/src/extractor/Dropload.ts +++ b/src/extractor/Dropload.ts @@ -19,8 +19,8 @@ export class Dropload implements Extractor { readonly supports = (url: URL): boolean => null !== url.host.match(/dropload/); readonly extract = async (ctx: Context, url: URL, countryCode: string) => { - const normalizedUrl = url.href.replace('/e/', '').replace('/embed-', '/'); - const html = await this.fetcher.text(ctx, new URL(normalizedUrl)); + url.pathname = url.pathname.replace('/e/', '').replace('/embed-', '/'); + const html = await this.fetcher.text(ctx, url); const heightMatch = html.match(/\d{3,}x(\d{3,}),/) as string[]; diff --git a/src/extractor/SuperVideo.ts b/src/extractor/SuperVideo.ts index 6565f31..baaec3d 100644 --- a/src/extractor/SuperVideo.ts +++ b/src/extractor/SuperVideo.ts @@ -19,8 +19,8 @@ export class SuperVideo implements Extractor { readonly supports = (url: URL): boolean => null !== url.host.match(/supervideo/); readonly extract = async (ctx: Context, url: URL, countryCode: string) => { - const normalizedUrl = url.href.replace('/e/', '/').replace('/embed-', '/'); - const html = await this.fetcher.text(ctx, new URL(normalizedUrl)); + url.pathname = url.pathname.replace('/e/', '').replace('/embed-', '/'); + const html = await this.fetcher.text(ctx, url); const heightAndSizeMatch = html.match(/\d{3,}x(\d{3,}), ([\d.]+ ?[GM]B)/) as string[];