From c075fe9481f21e2f3f5715227b4b939c3de11d0b Mon Sep 17 00:00:00 2001 From: WebStreamr <210764791+webstreamr@users.noreply.github.com> Date: Fri, 2 Jan 2026 15:00:35 +0000 Subject: [PATCH] fix(extractor): handle FileLions deleted by administration --- src/extractor/FileLions.test.ts | 4 + src/extractor/FileLions.ts | 2 +- .../https:callistanise.comfcy4t5nkerjrt | 145 ++++++++++++++++++ .../__snapshots__/FileLions.test.ts.snap | 2 + 4 files changed, 152 insertions(+), 1 deletion(-) create mode 100644 src/extractor/__fixtures__/FileLions/https:callistanise.comfcy4t5nkerjrt diff --git a/src/extractor/FileLions.test.ts b/src/extractor/FileLions.test.ts index 1cf4b3c..e6750bc 100644 --- a/src/extractor/FileLions.test.ts +++ b/src/extractor/FileLions.test.ts @@ -21,4 +21,8 @@ describe('FileLions', () => { test('file not found', async () => { expect(await extractorRegistry.handle(ctx, new URL('https://filelions.to/v/ylcp2cu5qanb'))).toMatchSnapshot(); }); + + test('deleted by administration', async () => { + expect(await extractorRegistry.handle(ctx, new URL('https://callistanise.com/f/cy4t5nkerjrt'))).toMatchSnapshot(); + }); }); diff --git a/src/extractor/FileLions.ts b/src/extractor/FileLions.ts index 682b435..378187a 100644 --- a/src/extractor/FileLions.ts +++ b/src/extractor/FileLions.ts @@ -71,7 +71,7 @@ export class FileLions extends Extractor { return await this.extractInternal(ctx, new URL(url.href.replace('/f/', '/v/')), meta); } - if (/File Not Found/.test(html)) { + if (/File Not Found|deleted by administration/.test(html)) { throw new NotFoundError(); } diff --git a/src/extractor/__fixtures__/FileLions/https:callistanise.comfcy4t5nkerjrt b/src/extractor/__fixtures__/FileLions/https:callistanise.comfcy4t5nkerjrt new file mode 100644 index 0000000..f637bba --- /dev/null +++ b/src/extractor/__fixtures__/FileLions/https:callistanise.comfcy4t5nkerjrt @@ -0,0 +1,145 @@ + + + + + + + + Watch 300938 570f5a24 c281 484d 93fa 734dabbec813 jkgg 2651705 vidhide mp4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+ + + +
+
+ + +
+
+
+ + +
+
+
+
+
+ The file was deleted by administration because it didn't comply with our Terms of Use: +
+

+ 300938--570f5a24-c281-484d-93fa-734dabbec813--jkgg--2651705-vidhide.mp4 +

+
+ Reason for deletion:
+ + DMCA request + +
+
+
+
+ + + + + + diff --git a/src/extractor/__snapshots__/FileLions.test.ts.snap b/src/extractor/__snapshots__/FileLions.test.ts.snap index 56fa1d7..e85d932 100644 --- a/src/extractor/__snapshots__/FileLions.test.ts.snap +++ b/src/extractor/__snapshots__/FileLions.test.ts.snap @@ -1,5 +1,7 @@ // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing +exports[`FileLions deleted by administration 1`] = `[]`; + exports[`FileLions file not found 1`] = `[]`; exports[`FileLions filelions f 1`] = `