Update soaperTv
This commit is contained in:
parent
70127b8588
commit
83ba2bf8d1
|
@ -1,10 +1,9 @@
|
|||
import { load } from 'cheerio';
|
||||
|
||||
import { flags } from '@/entrypoint/utils/targets';
|
||||
import { Caption, labelToLanguageCode } from '@/providers/captions';
|
||||
import { Stream } from '@/providers/streams';
|
||||
import { MovieScrapeContext, ShowScrapeContext } from '@/utils/context';
|
||||
import { NotFoundError } from '@/utils/errors';
|
||||
import { convertPlaylistsToDataUrls } from '@/utils/playlist';
|
||||
|
||||
import { InfoResponse } from './types';
|
||||
import { SourcererOutput, makeSourcerer } from '../../base';
|
||||
|
@ -89,20 +88,22 @@ const universalScraper = async (ctx: MovieScrapeContext | ShowScrapeContext): Pr
|
|||
stream: [
|
||||
{
|
||||
id: 'primary',
|
||||
playlist: await convertPlaylistsToDataUrls(ctx.proxiedFetcher, `${baseUrl}/${streamResJson.val}`),
|
||||
playlist: `${baseUrl}/${streamResJson.val}`,
|
||||
type: 'hls',
|
||||
flags: [flags.CORS_ALLOWED],
|
||||
proxyDepth: 2,
|
||||
flags: [],
|
||||
captions,
|
||||
},
|
||||
...(streamResJson.val_bak
|
||||
? [
|
||||
{
|
||||
id: 'backup',
|
||||
playlist: await convertPlaylistsToDataUrls(ctx.proxiedFetcher, `${baseUrl}/${streamResJson.val_bak}`),
|
||||
type: 'hls' as const,
|
||||
flags: [flags.CORS_ALLOWED],
|
||||
playlist: `${baseUrl}/${streamResJson.val_bak}`,
|
||||
type: 'hls',
|
||||
proxyDepth: 2,
|
||||
flags: [],
|
||||
captions,
|
||||
},
|
||||
} as Stream,
|
||||
]
|
||||
: []),
|
||||
],
|
||||
|
@ -113,7 +114,7 @@ export const soaperTvScraper = makeSourcerer({
|
|||
id: 'soapertv',
|
||||
name: 'SoaperTV',
|
||||
rank: 126,
|
||||
flags: [flags.CORS_ALLOWED],
|
||||
flags: [],
|
||||
scrapeMovie: universalScraper,
|
||||
scrapeShow: universalScraper,
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue