+
+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 +
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 @@ + + +
+ + +