From db3ecc6625b3438f04708472d9fecc0c27548d0a Mon Sep 17 00:00:00 2001 From: MoonPic <99568458+moonpic@users.noreply.github.com> Date: Sat, 17 May 2025 22:35:24 -0400 Subject: [PATCH] Update streamwish.ts --- src/providers/embeds/streamwish.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/providers/embeds/streamwish.ts b/src/providers/embeds/streamwish.ts index af980eb..b3f5700 100644 --- a/src/providers/embeds/streamwish.ts +++ b/src/providers/embeds/streamwish.ts @@ -1,4 +1,5 @@ /* eslint-disable no-console */ +// eslint-disable-next-line @typescript-eslint/no-unused-vars import { flags } from '@/entrypoint/utils/targets'; import { makeEmbed } from '@/providers/base'; import { NotFoundError } from '@/utils/errors'; @@ -32,6 +33,8 @@ function embed(provider: { id: string; name: string; rank: number }) { name: provider.name, rank: provider.rank, async scrape(ctx) { + console.log('Starting scrape for StreamWish with URL:', ctx.url); + const encodedUrl = encodeURIComponent(ctx.url); const apiUrl = `https://ws-m3u8.moonpic.qzz.io/m3u8/${encodedUrl}`; @@ -42,9 +45,7 @@ function embed(provider: { id: string; name: string; rank: number }) { }, }); - if (!response.ok) throw new NotFoundError('No video URL found'); - const data = await response.json(); - + const data: { m3u8: string } = await response.json(); const videoUrl = data.m3u8; if (!videoUrl) throw new NotFoundError('No video URL found');