diff --git a/src/providers/sources/goojara/getEmbeds.ts b/src/providers/sources/goojara/getEmbeds.ts index de2148a..33b7e16 100644 --- a/src/providers/sources/goojara/getEmbeds.ts +++ b/src/providers/sources/goojara/getEmbeds.ts @@ -2,13 +2,13 @@ import { load } from 'cheerio'; import { ScrapeContext } from '@/utils/context'; -import { EmbedsResult } from './type'; +import { EmbedsResult, baseUrl, baseUrl2 } from './type'; export async function getEmbeds(ctx: ScrapeContext, id: string): Promise { const data = await ctx.fetcher.full(`/${id}`, { - baseUrl: 'https://ww1.goojara.to', + baseUrl: baseUrl2, headers: { - Referer: 'https://www.goojara.to/', + Referer: baseUrl, }, readHeaders: ['Set-Cookie'], method: 'GET', @@ -23,7 +23,7 @@ export async function getEmbeds(ctx: ScrapeContext, id: string): Promise $(element).attr('href')) .get() - .filter((href) => href && href.includes('https://ww1.goojara.to/go.php')); + .filter((href) => href && href.includes(`${baseUrl2}/go.php`)); const embedPages = await Promise.all( embedRedirectURLs.map( @@ -32,7 +32,7 @@ export async function getEmbeds(ctx: ScrapeContext, id: string): Promise { data = await ctx.fetcher(`/xhrr.php`, { - baseUrl: 'https://www.goojara.to', + baseUrl, headers: headersData, method: 'POST', body: new URLSearchParams({ q: media.title }), @@ -66,7 +66,7 @@ export async function scrapeIds( id = result.slug; } else if (media.type === 'show') { data = await ctx.fetcher(`/${result.slug}`, { - baseUrl: 'https://www.goojara.to', + baseUrl, headers: headersData, method: 'GET', }); @@ -78,7 +78,7 @@ export async function scrapeIds( if (!dataId) throw NotFoundError; data = await ctx.fetcher(`/xhrc.php`, { - baseUrl: 'https://ww1.goojara.to', + baseUrl, headers: headersData, method: 'POST', body: new URLSearchParams({ s: media.season.number.toString(), t: dataId }),