This commit is contained in:
TPN 2024-06-16 13:43:56 +05:30
parent d096bfadf1
commit 6054a2d187
No known key found for this signature in database
GPG key ID: 40AE091637892B91

View file

@ -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<string>('/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,
});