+
+Possible causes of this error could be: +
-
+
- The file expired +
- The file was deleted by its owner +
- The file was deleted by administration because it didn't comply with our Terms of Use +
From f0a66e19845a9b994f1f44cb3825e043f1697a51 Mon Sep 17 00:00:00 2001 From: WebStreamr <210764791+webstreamr@users.noreply.github.com> Date: Tue, 30 Sep 2025 08:10:17 +0000 Subject: [PATCH] fix(extractor): handle Uqload File Not Found --- src/extractor/Uqload.test.ts | 4 + src/extractor/Uqload.ts | 5 + .../Uqload/https:uqload.cx2ua47fdfkjgd.html | 113 ++++++++++++++++++ .../__snapshots__/Uqload.test.ts.snap | 2 + 4 files changed, 124 insertions(+) create mode 100644 src/extractor/__fixtures__/Uqload/https:uqload.cx2ua47fdfkjgd.html diff --git a/src/extractor/Uqload.test.ts b/src/extractor/Uqload.test.ts index 27009e7..e60d53f 100644 --- a/src/extractor/Uqload.test.ts +++ b/src/extractor/Uqload.test.ts @@ -13,4 +13,8 @@ describe('Uqload', () => { test('uqload.net /embed-', async () => { expect(await extractorRegistry.handle(ctx, new URL('https://uqload.net/embed-z0xbr87oz637.html'))).toMatchSnapshot(); }); + + test('file not found', async () => { + expect(await extractorRegistry.handle(ctx, new URL('https://uqload.cx/2ua47fdfkjgd.html'))).toMatchSnapshot(); + }); }); diff --git a/src/extractor/Uqload.ts b/src/extractor/Uqload.ts index c14e38a..120e4dc 100644 --- a/src/extractor/Uqload.ts +++ b/src/extractor/Uqload.ts @@ -1,4 +1,5 @@ import * as cheerio from 'cheerio'; +import { NotFoundError } from '../error'; import { Context, Format, Meta, UrlResult } from '../types'; import { buildMediaFlowProxyExtractorRedirectUrl, supportsMediaFlowProxy } from '../utils'; import { guessSizeFromMp4 } from '../utils/size'; @@ -24,6 +25,10 @@ export class Uqload extends Extractor { const html = await this.fetcher.text(ctx, url, { headers }); + if (/File Not Found/.test(html)) { + throw new NotFoundError(); + } + const heightMatch = html.match(/\d{3,}x(\d{3,})/); const $ = cheerio.load(html); diff --git a/src/extractor/__fixtures__/Uqload/https:uqload.cx2ua47fdfkjgd.html b/src/extractor/__fixtures__/Uqload/https:uqload.cx2ua47fdfkjgd.html new file mode 100644 index 0000000..9d94b57 --- /dev/null +++ b/src/extractor/__fixtures__/Uqload/https:uqload.cx2ua47fdfkjgd.html @@ -0,0 +1,113 @@ + + +
+ + +