From fc052a9f08ec4eddc3ad487c9fc6920d3c9a4c6b Mon Sep 17 00:00:00 2001 From: lonelil <51315646+lonelil@users.noreply.github.com> Date: Wed, 31 Jan 2024 03:38:30 +0800 Subject: [PATCH] re-add headers --- src/providers/sources/nepu/index.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/providers/sources/nepu/index.ts b/src/providers/sources/nepu/index.ts index 38128d9..1b31429 100644 --- a/src/providers/sources/nepu/index.ts +++ b/src/providers/sources/nepu/index.ts @@ -1,6 +1,5 @@ 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'; @@ -9,6 +8,7 @@ import { NotFoundError } from '@/utils/errors'; import { SearchResults } from './types'; const nepuBase = 'https://nepu.to'; +const nepuReferer = `${nepuBase}/`; const universalScraper = async (ctx: MovieScrapeContext | ShowScrapeContext) => { const searchResultRequest = await ctx.proxiedFetcher('/ajax/posts', { @@ -63,7 +63,11 @@ const universalScraper = async (ctx: MovieScrapeContext | ShowScrapeContext) => captions: [], playlist: streamUrl[1], type: 'hls', - flags: [flags.CORS_ALLOWED], + flags: [], + headers: { + Origin: nepuBase, + Referer: nepuReferer, + }, }, ], } as SourcererOutput; @@ -73,7 +77,7 @@ export const nepuScraper = makeSourcerer({ id: 'nepu', name: 'Nepu', rank: 111, - flags: [flags.CORS_ALLOWED], + flags: [], scrapeMovie: universalScraper, scrapeShow: universalScraper, });