From 79c8e7fc3255333ae011c12262410ef1739f304b Mon Sep 17 00:00:00 2001 From: WebStreamr <210764791+webstreamr@users.noreply.github.com> Date: Thu, 15 Jan 2026 20:05:03 +0000 Subject: [PATCH] fix(source): be resilient against missing heights in 4KHDHub --- src/source/FourKHDHub.test.ts | 5 + src/source/FourKHDHub.ts | 4 +- .../https:4khdhub.daddust-bunny-movie-5300 | 2032 +++++++++++++++++ .../https:4khdhub.dadsDustpercent20Bunny | 338 +++ .../https:api.themoviedb.org3movie1043197 | 1 + ...MWk0NFh4Z1ArTTYzTnBaQlhrZHFZQkJuVllQenc9PQ | 20 + ...bTBMMWxPanRJcWcycmRxd2JoWGthR1dodVova1E9PQ | 20 + ...ZStPc2pkTDJYbmhRSGJINmlHNjNGd01LV2VlMUE9PQ | 20 + ...QWRoeng5NzRoNFp1YzR2WGhUTjg1cmNNcGdFNlE9PQ | 20 + .../__snapshots__/FourKHDHub.test.ts.snap | 52 + 10 files changed, 2510 insertions(+), 2 deletions(-) create mode 100644 src/source/__fixtures__/FourKHDHub/https:4khdhub.daddust-bunny-movie-5300 create mode 100644 src/source/__fixtures__/FourKHDHub/https:4khdhub.dadsDustpercent20Bunny create mode 100644 src/source/__fixtures__/FourKHDHub/https:api.themoviedb.org3movie1043197 create mode 100644 src/source/__fixtures__/FourKHDHub/https:gadgetsweb.xyzidQ1dxTzFnbjhrQm5kMG5lL01tQzcvZzhmMjZOTkNrdktvSEp1VXBaU3FnY0xFcnFERGNvUE0vbnBNMWk0NFh4Z1ArTTYzTnBaQlhrZHFZQkJuVllQenc9PQ create mode 100644 src/source/__fixtures__/FourKHDHub/https:gadgetsweb.xyzidQ1dxTzFnbjhrQm5kMG5lL01tQzcvZzhmMjZOTkNrdktvSEp1VXBaU3FnZFFJbHRteXpZYkMrNmNBbTBMMWxPanRJcWcycmRxd2JoWGthR1dodVova1E9PQ create mode 100644 src/source/__fixtures__/FourKHDHub/https:gadgetsweb.xyzidQ1dxTzFnbjhrQm5kMG5lL01tQzcvZzhmMjZOTkNrdktvSEp1VXBaU3FnZXhIRWplczRhaCt2MEZHZStPc2pkTDJYbmhRSGJINmlHNjNGd01LV2VlMUE9PQ create mode 100644 src/source/__fixtures__/FourKHDHub/https:gadgetsweb.xyzidQ1dxTzFnbjhrQm5kMG5lL01tQzcvZzhmMjZOTkNrdktvSEp1VXBaU3FnZkVTNkJWaEhDVDhPMjgyQWRoeng5NzRoNFp1YzR2WGhUTjg1cmNNcGdFNlE9PQ diff --git a/src/source/FourKHDHub.test.ts b/src/source/FourKHDHub.test.ts index dd91e0b..3cbf7c4 100644 --- a/src/source/FourKHDHub.test.ts +++ b/src/source/FourKHDHub.test.ts @@ -75,4 +75,9 @@ describe('FourKHDHub', () => { const streams = await source.handle(ctx, 'movie', new TmdbId(299534, undefined, undefined)); expect(streams).toMatchSnapshot(); }); + + test('handle dust bunny', async () => { + const streams = await source.handle(ctx, 'movie', new TmdbId(1043197, undefined, undefined)); + expect(streams).toMatchSnapshot(); + }); }); diff --git a/src/source/FourKHDHub.ts b/src/source/FourKHDHub.ts index e811dfd..5b9f9ba 100644 --- a/src/source/FourKHDHub.ts +++ b/src/source/FourKHDHub.ts @@ -99,14 +99,14 @@ export class FourKHDHub extends Source { private readonly extractSourceResults = async (ctx: Context, $: CheerioAPI, el: BasicAcceptedElems, countryCodes: CountryCode[]): Promise => { const localHtml = $(el).html() as string; - const sizeMatch = localHtml.match(/([\d.]+ ?[GM]B)/) as string[]; + const sizeMatch = localHtml.match(/([\d.]+ ?[GM]B)/); const heightMatch = localHtml.match(/\d{3,}p/) as string[]; const meta: Meta = { countryCodes: [...new Set([...countryCodes, ...findCountryCodes(localHtml)])], - bytes: bytes.parse(sizeMatch[1] as string) as number, height: parseInt(heightMatch[0] as string), title: $('.file-title, .episode-file-title', el).text().trim(), + ...(sizeMatch && { bytes: bytes.parse(sizeMatch[1] as string) as number }), }; const redirectUrlHubCloud = $('a', el) diff --git a/src/source/__fixtures__/FourKHDHub/https:4khdhub.daddust-bunny-movie-5300 b/src/source/__fixtures__/FourKHDHub/https:4khdhub.daddust-bunny-movie-5300 new file mode 100644 index 0000000..3a062f3 --- /dev/null +++ b/src/source/__fixtures__/FourKHDHub/https:4khdhub.daddust-bunny-movie-5300 @@ -0,0 +1,2032 @@ + + + + + + Dust Bunny (2025) - 4K-HDHub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+ +
+ + + + +
+ + + + + +
+ + + + + +
+
+
+ + + + + + + + + +
+ + +
+
+ + +
+ +
+
+

Dust Bunny (2025)

+ + + + +

Sometimes there really are monsters under your bed.

+ +
+ + + Action + + Fantasy + + Thriller + + Movies + + 1080p + + 2160p + + DV HDR + + SDR + + English + + HEVC + + +
+ +
+ +
+
+ + + + +
+ +

+ Ten-year-old Aurora asks her hitman neighbor to kill the monster she believes ate her entire family. To protect her, he'll need to battle an onslaught of assassins while accepting the fact that some monsters are real.

+ + + + + + +
+ +
+ +

Download Links

+ + + +
+ + +
+
+ +
+ + Dust Bunny (1080p WEB-DL H264) +
7.9 PB + English + WEB-DL + +
+ + + + +
+ +
+ +
+
+ +
+ + Dust Bunny (2160p WEB-DL HDR DV H265) +
18.39 GB + English + WEB-DL + +
+ + + + +
+ +
+ +
+
+ +
+ + Dust Bunny (2160p WEB-DL H265) +
11.64 GB + English + WEB-DL + +
+ + + + +
+ +
+ +
+
+ +
+ + Dust Bunny (1080p WEB-DL H264) +
3.87 GB + English + WEB-DL + +
+ + + + +
+ +
+ + +
+
+ +
+
+ + + + + +

How to Download

+
+
    +
  1. Click on the download link of your choice.
  2. +
  3. Wait for the page to load and bypass any ads if necessary.
  4. +
  5. Click on the download button on the file hosting site.
  6. +
  7. Enjoy your high-quality movie!
  8. +
+
+ + +
+
+
+
+ +
+
+
+
+

4K-HDHub

+

+ Your one-stop destination for high-quality movies and TV shows in various formats. +

+
+ + +
+

Quick Links

+ +
+ +
+

Connect

+

Stay updated with the latest releases and news.

+
+
+ + +
+

© 2025 4K-HDHub - All rights reserved.

+
+
+
+ + + + + + + + + + + +
+ + + + + diff --git a/src/source/__fixtures__/FourKHDHub/https:4khdhub.dadsDustpercent20Bunny b/src/source/__fixtures__/FourKHDHub/https:4khdhub.dadsDustpercent20Bunny new file mode 100644 index 0000000..f3b88db --- /dev/null +++ b/src/source/__fixtures__/FourKHDHub/https:4khdhub.dadsDustpercent20Bunny @@ -0,0 +1,338 @@ + + + + + + + Search - Dust Bunny - 4KHDHub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ +
+ + + + +
+ + + + + +
+ + + + + +
+
+
+ + + + + + + + + +
+ + +
+ +
+ +
+
+
+
+

4KHDHub

+

+ Your one-stop destination for high-quality movies and TV shows in various formats. +

+
+ +
+

Quick Links

+ +
+ +
+

Connect

+

Stay updated with the latest releases and news.

+
+
+ +
+

© 2025 4KHDHub - All rights reserved.

+
+
+
+ + +
+ + + + \ No newline at end of file diff --git a/src/source/__fixtures__/FourKHDHub/https:api.themoviedb.org3movie1043197 b/src/source/__fixtures__/FourKHDHub/https:api.themoviedb.org3movie1043197 new file mode 100644 index 0000000..950dde3 --- /dev/null +++ b/src/source/__fixtures__/FourKHDHub/https:api.themoviedb.org3movie1043197 @@ -0,0 +1 @@ +{"adult":false,"backdrop_path":"/AecGG1XVCmkk7fT10ko3FC0dLIP.jpg","belongs_to_collection":null,"budget":0,"genres":[{"id":28,"name":"Action"},{"id":14,"name":"Fantasy"},{"id":53,"name":"Thriller"}],"homepage":"https://www.dustbunnyfilm.com/","id":1043197,"imdb_id":"tt23172090","origin_country":["US"],"original_language":"en","original_title":"Dust Bunny","overview":"Ten-year-old Aurora asks her hitman neighbor to kill the monster under her bed that she claims ate her family. To protect her, he must battle an onslaught of assassins while accepting that some monsters are real.","popularity":46.4937,"poster_path":"/vobigFZFvbYPf6ElYJu07P9rH8C.jpg","production_companies":[{"id":8147,"logo_path":"/q6HOAdSNgCbeOqwoMVRc6REgbXF.png","name":"Entertainment One","origin_country":"CA"},{"id":3528,"logo_path":"/cCzCClIzIh81Fa79hpW5nXoUsHK.png","name":"Thunder Road","origin_country":"US"},{"id":119153,"logo_path":"/4QVWLiNT8svS71FU2qsRErGeIar.png","name":"Hero Squared","origin_country":"HU"},{"id":103359,"logo_path":null,"name":"Living Dead Guy Productions","origin_country":"US"}],"production_countries":[{"iso_3166_1":"US","name":"United States of America"},{"iso_3166_1":"CA","name":"Canada"},{"iso_3166_1":"HU","name":"Hungary"}],"release_date":"2025-12-11","revenue":928164,"runtime":106,"spoken_languages":[{"english_name":"English","iso_639_1":"en","name":"English"}],"status":"Released","tagline":"Sometimes there really are monsters under your bed.","title":"Dust Bunny","video":false,"vote_average":7.192,"vote_count":35} \ No newline at end of file diff --git a/src/source/__fixtures__/FourKHDHub/https:gadgetsweb.xyzidQ1dxTzFnbjhrQm5kMG5lL01tQzcvZzhmMjZOTkNrdktvSEp1VXBaU3FnY0xFcnFERGNvUE0vbnBNMWk0NFh4Z1ArTTYzTnBaQlhrZHFZQkJuVllQenc9PQ b/src/source/__fixtures__/FourKHDHub/https:gadgetsweb.xyzidQ1dxTzFnbjhrQm5kMG5lL01tQzcvZzhmMjZOTkNrdktvSEp1VXBaU3FnY0xFcnFERGNvUE0vbnBNMWk0NFh4Z1ArTTYzTnBaQlhrZHFZQkJuVllQenc9PQ new file mode 100644 index 0000000..7bd61cb --- /dev/null +++ b/src/source/__fixtures__/FourKHDHub/https:gadgetsweb.xyzidQ1dxTzFnbjhrQm5kMG5lL01tQzcvZzhmMjZOTkNrdktvSEp1VXBaU3FnY0xFcnFERGNvUE0vbnBNMWk0NFh4Z1ArTTYzTnBaQlhrZHFZQkJuVllQenc9PQ @@ -0,0 +1,20 @@ + + +Redirecting ... + + + + + + + + + +Redirecting .. + + + + \ No newline at end of file diff --git a/src/source/__fixtures__/FourKHDHub/https:gadgetsweb.xyzidQ1dxTzFnbjhrQm5kMG5lL01tQzcvZzhmMjZOTkNrdktvSEp1VXBaU3FnZFFJbHRteXpZYkMrNmNBbTBMMWxPanRJcWcycmRxd2JoWGthR1dodVova1E9PQ b/src/source/__fixtures__/FourKHDHub/https:gadgetsweb.xyzidQ1dxTzFnbjhrQm5kMG5lL01tQzcvZzhmMjZOTkNrdktvSEp1VXBaU3FnZFFJbHRteXpZYkMrNmNBbTBMMWxPanRJcWcycmRxd2JoWGthR1dodVova1E9PQ new file mode 100644 index 0000000..c043711 --- /dev/null +++ b/src/source/__fixtures__/FourKHDHub/https:gadgetsweb.xyzidQ1dxTzFnbjhrQm5kMG5lL01tQzcvZzhmMjZOTkNrdktvSEp1VXBaU3FnZFFJbHRteXpZYkMrNmNBbTBMMWxPanRJcWcycmRxd2JoWGthR1dodVova1E9PQ @@ -0,0 +1,20 @@ + + +Redirecting ... + + + + + + + + + +Redirecting .. + + + + \ No newline at end of file diff --git a/src/source/__fixtures__/FourKHDHub/https:gadgetsweb.xyzidQ1dxTzFnbjhrQm5kMG5lL01tQzcvZzhmMjZOTkNrdktvSEp1VXBaU3FnZXhIRWplczRhaCt2MEZHZStPc2pkTDJYbmhRSGJINmlHNjNGd01LV2VlMUE9PQ b/src/source/__fixtures__/FourKHDHub/https:gadgetsweb.xyzidQ1dxTzFnbjhrQm5kMG5lL01tQzcvZzhmMjZOTkNrdktvSEp1VXBaU3FnZXhIRWplczRhaCt2MEZHZStPc2pkTDJYbmhRSGJINmlHNjNGd01LV2VlMUE9PQ new file mode 100644 index 0000000..75c0f8f --- /dev/null +++ b/src/source/__fixtures__/FourKHDHub/https:gadgetsweb.xyzidQ1dxTzFnbjhrQm5kMG5lL01tQzcvZzhmMjZOTkNrdktvSEp1VXBaU3FnZXhIRWplczRhaCt2MEZHZStPc2pkTDJYbmhRSGJINmlHNjNGd01LV2VlMUE9PQ @@ -0,0 +1,20 @@ + + +Redirecting ... + + + + + + + + + +Redirecting .. + + + + \ No newline at end of file diff --git a/src/source/__fixtures__/FourKHDHub/https:gadgetsweb.xyzidQ1dxTzFnbjhrQm5kMG5lL01tQzcvZzhmMjZOTkNrdktvSEp1VXBaU3FnZkVTNkJWaEhDVDhPMjgyQWRoeng5NzRoNFp1YzR2WGhUTjg1cmNNcGdFNlE9PQ b/src/source/__fixtures__/FourKHDHub/https:gadgetsweb.xyzidQ1dxTzFnbjhrQm5kMG5lL01tQzcvZzhmMjZOTkNrdktvSEp1VXBaU3FnZkVTNkJWaEhDVDhPMjgyQWRoeng5NzRoNFp1YzR2WGhUTjg1cmNNcGdFNlE9PQ new file mode 100644 index 0000000..3b53860 --- /dev/null +++ b/src/source/__fixtures__/FourKHDHub/https:gadgetsweb.xyzidQ1dxTzFnbjhrQm5kMG5lL01tQzcvZzhmMjZOTkNrdktvSEp1VXBaU3FnZkVTNkJWaEhDVDhPMjgyQWRoeng5NzRoNFp1YzR2WGhUTjg1cmNNcGdFNlE9PQ @@ -0,0 +1,20 @@ + + +Redirecting ... + + + + + + + + + +Redirecting .. + + + + \ No newline at end of file diff --git a/src/source/__snapshots__/FourKHDHub.test.ts.snap b/src/source/__snapshots__/FourKHDHub.test.ts.snap index c6f7088..8dce6e0 100644 --- a/src/source/__snapshots__/FourKHDHub.test.ts.snap +++ b/src/source/__snapshots__/FourKHDHub.test.ts.snap @@ -389,6 +389,58 @@ exports[`FourKHDHub handle dexter resurrection 2025 s01e01 1`] = ` ] `; +exports[`FourKHDHub handle dust bunny 1`] = ` +[ + { + "meta": { + "countryCodes": [ + "multi", + "en", + ], + "height": 1080, + "title": "Dust.Bunny.2025.1080p.iT.WEB-DL.English.DDP5.1.Atmos.H.264-4kHDHub.Com.mkv", + }, + "url": "https://hubcloud.foo/drive/lo89bsn98fp9gt1", + }, + { + "meta": { + "bytes": 19746112143, + "countryCodes": [ + "multi", + "en", + ], + "height": 2160, + "title": "Dust.Bunny.2025.2160p.iT.WEB-DL.English.DDP5.1.Atmos.DV.HDR.H.265-4kHDHub.Com.mkv", + }, + "url": "https://hubcloud.foo/drive/tgeemytzlxgtyal", + }, + { + "meta": { + "bytes": 12498354831, + "countryCodes": [ + "multi", + "en", + ], + "height": 2160, + "title": "Dust.Bunny.2025.2160p.AMZN.WEB-DL.English.DDP5.1.Atmos.H.265-4kHDHub.Com.mkv", + }, + "url": "https://hubcloud.foo/drive/giejj9shsc9i777", + }, + { + "meta": { + "bytes": 4155380858, + "countryCodes": [ + "multi", + "en", + ], + "height": 1080, + "title": "Dust.Bunny.2025.1080p.AMZN.WEB-DL.English.DDP5.1.Atmos.H.264-4kHDHub.Com.mkv", + }, + "url": "https://hubcloud.foo/drive/xd2ndhiin1w8fbd", + }, +] +`; + exports[`FourKHDHub handle f1 1`] = ` [ {