From 6054a2d187f8a03953bd6e2a88c67920045356a7 Mon Sep 17 00:00:00 2001 From: TPN Date: Sun, 16 Jun 2024 13:43:56 +0530 Subject: [PATCH] fix nepu --- src/providers/sources/nepu/index.ts | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/providers/sources/nepu/index.ts b/src/providers/sources/nepu/index.ts index 0e19721..d5805ac 100644 --- a/src/providers/sources/nepu/index.ts +++ b/src/providers/sources/nepu/index.ts @@ -1,5 +1,6 @@ import { load } from 'cheerio'; +import { flags } from '@/entrypoint/utils/targets'; import { SourcererOutput, makeSourcerer } from '@/providers/base'; import { compareTitle } from '@/utils/compare'; import { MovieScrapeContext, ShowScrapeContext } from '@/utils/context'; @@ -7,8 +8,7 @@ import { NotFoundError } from '@/utils/errors'; import { SearchResults } from './types'; -const nepuBase = 'https://nepu.to'; -const nepuReferer = `${nepuBase}/`; +const nepuBase = 'https://nepu.io'; const universalScraper = async (ctx: MovieScrapeContext | ShowScrapeContext) => { const searchResultRequest = await ctx.proxiedFetcher('/ajax/posts', { @@ -63,11 +63,7 @@ const universalScraper = async (ctx: MovieScrapeContext | ShowScrapeContext) => captions: [], playlist: streamUrl[1], type: 'hls', - flags: [], - headers: { - Origin: nepuBase, - Referer: nepuReferer, - }, + flags: [flags.CORS_ALLOWED], }, ], } as SourcererOutput; @@ -77,8 +73,7 @@ export const nepuScraper = makeSourcerer({ id: 'nepu', name: 'Nepu', rank: 80, - flags: [], - disabled: true, + flags: [flags.CORS_ALLOWED], scrapeMovie: universalScraper, scrapeShow: universalScraper, });