diff --git a/src/extractor/HubCloud.ts b/src/extractor/HubCloud.ts index 9722a7f..1db2105 100644 --- a/src/extractor/HubCloud.ts +++ b/src/extractor/HubCloud.ts @@ -8,7 +8,7 @@ export class HubCloud extends Extractor { public readonly label = 'HubCloud'; - public override readonly ttl: number = 259200000; // 3d + public override readonly ttl: number = 518400000; // 6d public supports(_ctx: Context, url: URL): boolean { return null !== url.host.match(/hubcloud/); diff --git a/src/extractor/HubDrive.test.ts b/src/extractor/HubDrive.test.ts new file mode 100644 index 0000000..af3a214 --- /dev/null +++ b/src/extractor/HubDrive.test.ts @@ -0,0 +1,25 @@ +import winston from 'winston'; +import { createTestContext } from '../test'; +import { FetcherMock } from '../utils'; +import { ExtractorRegistry } from './ExtractorRegistry'; +import { HubCloud } from './HubCloud'; +import { HubDrive } from './HubDrive'; + +const logger = winston.createLogger({ transports: [new winston.transports.Console({ level: 'nope' })] }); +const extractorRegistry = new ExtractorRegistry( + logger, + [ + new HubDrive( + new FetcherMock(`${__dirname}/__fixtures__/HubDrive`), + new HubCloud(new FetcherMock(`${__dirname}/__fixtures__/HubDrive/HubCloud`)), + ), + ], +); + +const ctx = createTestContext(); + +describe('HubDrive', () => { + test('handle avatar', async () => { + expect(await extractorRegistry.handle(ctx, new URL('https://hubdrive.space/file/7283903021'))).toMatchSnapshot(); + }); +}); diff --git a/src/extractor/HubDrive.ts b/src/extractor/HubDrive.ts new file mode 100644 index 0000000..457895e --- /dev/null +++ b/src/extractor/HubDrive.ts @@ -0,0 +1,36 @@ +import * as cheerio from 'cheerio'; +import { Context, Meta, UrlResult } from '../types'; +import { Fetcher } from '../utils'; +import { Extractor } from './Extractor'; +import { HubCloud } from './HubCloud'; + +export class HubDrive extends Extractor { + public readonly id = 'hubdrive'; + + public readonly label = 'HubDrive'; + + public override readonly ttl: number = 518400000; // 6d + + private readonly hubCloud: HubCloud; + + public constructor(fetcher: Fetcher, hubCloud: HubCloud) { + super(fetcher); + + this.hubCloud = hubCloud; + } + + public supports(_ctx: Context, url: URL): boolean { + return null !== url.host.match(/hubdrive/); + } + + protected async extractInternal(ctx: Context, url: URL, meta: Meta): Promise { + const headers = { Referer: meta.referer ?? url.href }; + + const html = await this.fetcher.text(ctx, url, { headers }); + const $ = cheerio.load(html); + + const hubCloudUrl = new URL($('a:contains("HubCloud")').attr('href') as string); + + return this.hubCloud.extract(ctx, hubCloudUrl, meta); + }; +} diff --git a/src/extractor/__fixtures__/HubDrive/HubCloud/https:gamerxyt.comhubcloud.phphosthubcloudandid1qepetxqp4nhxxqandtokendDU4Z2M5RGgxcGl0Y01yTzd0eWRnTmdDS2QzVTVUQWpIR2xtS1R5RGhWaz0 b/src/extractor/__fixtures__/HubDrive/HubCloud/https:gamerxyt.comhubcloud.phphosthubcloudandid1qepetxqp4nhxxqandtokendDU4Z2M5RGgxcGl0Y01yTzd0eWRnTmdDS2QzVTVUQWpIR2xtS1R5RGhWaz0 new file mode 100644 index 0000000..b7219f9 --- /dev/null +++ b/src/extractor/__fixtures__/HubDrive/HubCloud/https:gamerxyt.comhubcloud.phphosthubcloudandid1qepetxqp4nhxxqandtokendDU4Z2M5RGgxcGl0Y01yTzd0eWRnTmdDS2QzVTVUQWpIR2xtS1R5RGhWaz0 @@ -0,0 +1,373 @@ + + + + + + + +Avatar (2009) Extended Collector's Edition IMAX 2160p UHD BluRay REMUX DV HDR 10bit HEVC [Hindi DDP 5.1 + English DTS-HD MA 5.1] x265 (LM-LUMiX) 4KHDHUB.[Com].mkv + + + + + + + + + + + + + + + + + + + + +
+
+
+HubCloud | Login +
+ +
+
+

+
+ +
+ +
+ Avatar (2009) Extended Collector's Edition IMAX 2160p UHD BluRay REMUX DV HDR 10bit HEVC [Hindi DDP 5.1 + English DTS-HD MA 5.1] x265 (LM-LUMiX) 4KHDHUB.[Com].mkv
+ +
+
    +
  • File Size60.21 GB
  • +
  • File Typevideo/x-matrosk
  • +
  • Share Date13-May-2025 05:55:49
  • +
+ +
+
+ + +
+

Download Link Generated

+
+ +
+ Copy Share Link +
+
+ + + + + + + + + +
+ + +
+ + + + + + Download [FSL Server] + + + + + + + + + + Download [Server : 10Gbps] + +

+ Resume Not Supported in 10Gbps So Use only if you have stable internet (: +

+ + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + + +
+ + + +
+
+ +
+ +
+
+
+

+
+Msc + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/extractor/__fixtures__/HubDrive/HubCloud/https:hubcloud.fyidrive1qepetxqp4nhxxq b/src/extractor/__fixtures__/HubDrive/HubCloud/https:hubcloud.fyidrive1qepetxqp4nhxxq new file mode 100644 index 0000000..bdf012a --- /dev/null +++ b/src/extractor/__fixtures__/HubDrive/HubCloud/https:hubcloud.fyidrive1qepetxqp4nhxxq @@ -0,0 +1,328 @@ + + +Avatar (2009) Extended Collector's Edition IMAX 2160p UHD BluRay REMUX DV HDR 10bit HEVC [Hindi DDP 5.1 + English DTS-HD MA 5.1] x265 (LM-LUMiX) 4KHDHUB.[Com].mkv + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
+HubCloud | Create An Account |Login +
+
+
+
+

+
+ +
+ +
+ Avatar (2009) Extended Collector's Edition IMAX 2160p UHD BluRay REMUX DV HDR 10bit HEVC [Hindi DDP 5.1 + English DTS-HD MA 5.1] x265 (LM-LUMiX) 4KHDHUB.[Com].mkv
+ +
+
    +
  • File Size60.21 GB
  • +
  • File Typevideo/x-matrosk
  • +
  • Share Date13-May-2025 05:55:49
  • +
+ + +
+
+ + +
+ + + +
+ + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + +

Please Wait While Page is loading

+
+
+ + + + Generate Direct Download Link + + +
+ + + +
+ + + + + +
+

+
+ + + + + +
+ + + + + +
+ + + + + + +
+
+ +
+ +
+
+
+

+
+ + + + + + \ No newline at end of file diff --git a/src/extractor/__fixtures__/HubDrive/https:hubdrive.spacefile7283903021 b/src/extractor/__fixtures__/HubDrive/https:hubdrive.spacefile7283903021 new file mode 100644 index 0000000..07c681e --- /dev/null +++ b/src/extractor/__fixtures__/HubDrive/https:hubdrive.spacefile7283903021 @@ -0,0 +1,506 @@ + + + + + + + + + + + + + + + + + + + +HubDrive | Avatar (2009) Extended Collector's Edition IMAX 2160p UHD BluRay REMUX DV HDR 10bit HEVC [Hindi DDP 5.1 + English DTS-HD MA 5.1] x265 (LM-LUMiX) 4KHDHUB.[Com].mkv + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + + + + + + + + + + +
+ + +
+
+
+ +
+
Avatar (2009) Extended Collector's Edition IMAX 2160p UHD BluRay REMUX DV HDR 10bit HEVC [Hindi DDP 5.1 + English DTS-HD MA 5.1] x265 (LM-LUMiX) 4KHDHUB.[Com].mkv
+
+
+
+ + + + + + + + + + + + + + + +
File Size60.21 GB
File Typevideo/x-matroska
File OwnerHubCloud User
+
+
+
+
+ + + +
+
+ +
+ +
[HubCloud Server]
+ + + + +

+
+ +
+ +
+ +
+ +
+ + + + + + + + + + + + +
+
+
+
+
+
+ +
+ + + + +
+
+ + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/extractor/__snapshots__/HubCloud.test.ts.snap b/src/extractor/__snapshots__/HubCloud.test.ts.snap index dc19fc3..be9f3a4 100644 --- a/src/extractor/__snapshots__/HubCloud.test.ts.snap +++ b/src/extractor/__snapshots__/HubCloud.test.ts.snap @@ -10,7 +10,7 @@ exports[`HubCloud handle crayon shin-chan 1993 1`] = ` "extractorId": "hubcloud_fsl", "title": "Crayon Shinchan Action Kamen vs Demon (1993) 1080p BluRay REMUX AVC [Hindi DD 2.0 + Japanese FLAC 2.0] (PitiPati-Ionicboy) (4kHDHub.com).mkv", }, - "ttl": 259200000, + "ttl": 518400000, "url": "https://pub-6b25c191839c4b01a878de4fdde0227b.r2.dev/e35ec4a9a4efb5a154d0d10f9481dafc?token=1765557445", }, ] @@ -26,7 +26,7 @@ exports[`HubCloud handle dark 2017 s03e08 1`] = ` "extractorId": "hubcloud_pixelserver", "title": "Dark.S03E08.The.Paradise.1080p.NF.WEB-DL.English.DDP5.1-German.DDP5.1.H.264-4kHdHub.Com.mkv", }, - "ttl": 259200000, + "ttl": 518400000, "url": "https://pixeldrain.dev/api/file/2kFQBQio", }, ] @@ -42,7 +42,7 @@ exports[`HubCloud handle dexter original sin 2024 s01e01 1`] = ` "extractorId": "hubcloud_fsl", "title": "Dexter.Original.Sin.S01E01.2160p.SKST.WEB-DL.H.265.DDP5.1-Tyrell.mkv", }, - "ttl": 259200000, + "ttl": 518400000, "url": "https://pub-b5ecaffddf2344a0ae2222f5e8913e1b.r2.dev/Dexter.Original.Sin.S01E01.2160p.SKST.WEB-DL.H.265.DDP5.1-Tyrell.mkv?token=1765557444", }, { @@ -53,7 +53,7 @@ exports[`HubCloud handle dexter original sin 2024 s01e01 1`] = ` "extractorId": "hubcloud_pixelserver", "title": "Dexter.Original.Sin.S01E01.2160p.SKST.WEB-DL.H.265.DDP5.1-Tyrell.mkv", }, - "ttl": 259200000, + "ttl": 518400000, "url": "https://pixeldrain.dev/api/file/HqAiguQV", }, ] diff --git a/src/extractor/__snapshots__/HubDrive.test.ts.snap b/src/extractor/__snapshots__/HubDrive.test.ts.snap new file mode 100644 index 0000000..0ba4054 --- /dev/null +++ b/src/extractor/__snapshots__/HubDrive.test.ts.snap @@ -0,0 +1,17 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`HubDrive handle avatar 1`] = ` +[ + { + "format": "unknown", + "label": "HubCloud (FSL)", + "meta": { + "bytes": 64649995223, + "extractorId": "hubcloud_fsl", + "title": "Avatar (2009) Extended Collector's Edition IMAX 2160p UHD BluRay REMUX DV HDR 10bit HEVC [Hindi DDP 5.1 + English DTS-HD MA 5.1] x265 (LM-LUMiX) 4KHDHUB.[Com].mkv", + }, + "ttl": 518400000, + "url": "https://love.polgen.buzz/9eb5c280ca70adc5c98417476ff16743?token=1768569027", + }, +] +`; diff --git a/src/extractor/index.ts b/src/extractor/index.ts index e7b3e6a..cfe91ac 100644 --- a/src/extractor/index.ts +++ b/src/extractor/index.ts @@ -8,6 +8,7 @@ import { FileLions } from './FileLions'; import { FileMoon } from './FileMoon'; import { Fsst } from './Fsst'; import { HubCloud } from './HubCloud'; +import { HubDrive } from './HubDrive'; import { KinoGer } from './KinoGer'; import { LuluStream } from './LuluStream'; import { Mixdrop } from './Mixdrop'; @@ -30,6 +31,8 @@ export * from './ExtractorRegistry'; export const createExtractors = (fetcher: Fetcher): Extractor[] => { const disabledExtractors = envGet('DISABLED_EXTRACTORS')?.split(',') ?? []; + const hubCloud = new HubCloud(fetcher); + return [ new DoodStream(fetcher), new Dropload(fetcher), @@ -37,7 +40,8 @@ export const createExtractors = (fetcher: Fetcher): Extractor[] => { new FileLions(fetcher), new FileMoon(fetcher), new Fsst(fetcher), - new HubCloud(fetcher), + hubCloud, + new HubDrive(fetcher, hubCloud), new KinoGer(fetcher), new LuluStream(fetcher), new Mixdrop(fetcher), diff --git a/src/source/FourKHDHub.ts b/src/source/FourKHDHub.ts index 5b9f9ba..73478e3 100644 --- a/src/source/FourKHDHub.ts +++ b/src/source/FourKHDHub.ts @@ -123,10 +123,7 @@ export class FourKHDHub extends Source { .map((_i, el) => new URL($(el).attr('href') as string)) .get(0) as URL; - const hubDriveHtml = await this.fetcher.text(ctx, await this.resolveRedirectUrl(ctx, redirectUrlHubDrive)); - const $2 = cheerio.load(hubDriveHtml); - - return { url: new URL($2('a:contains("HubCloud")').attr('href') as string), meta }; + return { url: await this.resolveRedirectUrl(ctx, redirectUrlHubDrive), meta }; }; private async resolveRedirectUrl(ctx: Context, redirectUrl: URL): Promise { diff --git a/src/source/__snapshots__/FourKHDHub.test.ts.snap b/src/source/__snapshots__/FourKHDHub.test.ts.snap index 8dce6e0..a460874 100644 --- a/src/source/__snapshots__/FourKHDHub.test.ts.snap +++ b/src/source/__snapshots__/FourKHDHub.test.ts.snap @@ -187,7 +187,7 @@ exports[`FourKHDHub handle crank 2006 1`] = ` "height": 1080, "title": "Crank (2006) Director's Cut 1080p BluRay REMUX VC-1 [Hindi AMZN DDP 5.1 ~ 640kbps + English DTS-HD HRA 5.1] ESubs ~ (Arrow) FraMeSToR.mkv", }, - "url": "https://hubcloud.fyi/drive/lqa8qw881tasohi", + "url": "https://hubdrive.space/file/14019654338", }, { "meta": { @@ -200,7 +200,7 @@ exports[`FourKHDHub handle crank 2006 1`] = ` "height": 1080, "title": "Crank (2006) Director's Cut 1080p BluRay x264 [Hindi AMZN DDP 5.1 ~ 640kbps + English DTS] ESubs ~ (Arrow) CtrlHD.mkv", }, - "url": "https://hubcloud.fyi/drive/eijzmr9jiwy1r4z", + "url": "https://hubdrive.space/file/3499951460", }, { "meta": { @@ -213,7 +213,7 @@ exports[`FourKHDHub handle crank 2006 1`] = ` "height": 1080, "title": "Crank (2006) Director's Cut 1080p 10bit BluRay x265 HEVC [Hindi AMZN DDP 5.1 ~ 640Kbps + English DD 5.1] ESubs ~ (Arrow) Chivaman.mkv", }, - "url": "https://hubcloud.fyi/drive/sc0yyca6hq11y0r", + "url": "https://hubdrive.space/file/2344141892", }, ] `;