diff --git a/src/extractor/DoodStream.ts b/src/extractor/DoodStream.ts index 2901014..8c89e7f 100644 --- a/src/extractor/DoodStream.ts +++ b/src/extractor/DoodStream.ts @@ -31,7 +31,7 @@ export class DoodStream implements Extractor { const baseUrl = await this.fetcher.text(ctx, new URL(`http://dood.to${passMd5Match[0]}`)); return { - url: new URL(`${baseUrl + randomstring.generate(10)}?token=${token}&expiry=${Date.now()}`), + url: new URL(`${baseUrl}${randomstring.generate(10)}?token=${token}&expiry=${Date.now()}`), label: this.label, sourceId: `${this.id}_${countryCode.toLowerCase()}`, height: 0, diff --git a/src/extractor/ExtractorRegistry.ts b/src/extractor/ExtractorRegistry.ts index 5e0d822..a8d8ac6 100644 --- a/src/extractor/ExtractorRegistry.ts +++ b/src/extractor/ExtractorRegistry.ts @@ -38,7 +38,7 @@ export class ExtractorRegistry { try { urlResult = await extractor.extract(ctx, url, countryCode); } catch (error) { - this.logger.warn(`${extractor.id} error: ` + error, ctx); + this.logger.warn(`${extractor.id} error: ${error}`, ctx); return undefined; } diff --git a/src/utils/embed.ts b/src/utils/embed.ts index d0b9dae..0696337 100644 --- a/src/utils/embed.ts +++ b/src/utils/embed.ts @@ -11,7 +11,7 @@ export const extractUrlFromPacked = (html: string, linkRegExps: RegExp[]): URL = for (const linkRegexp of linkRegExps) { const linkMatch = unpacked.match(linkRegexp); if (linkMatch && linkMatch[1]) { - return new URL('https://' + linkMatch[1].replace(/^(https:)?\/\//, '')); + return new URL(`https://${linkMatch[1].replace(/^(https:)?\/\//, '')}`); } }