Update Flags for vidsrcto

This commit is contained in:
TPN 2024-07-03 09:05:50 +01:00
parent 053ca3fe5a
commit 5c95f64c69
No known key found for this signature in database
GPG Key ID: 40AE091637892B91
4 changed files with 9 additions and 4 deletions

View File

@ -1,6 +1,8 @@
import { load } from 'cheerio'; import { load } from 'cheerio';
import { unpack } from 'unpacker'; import { unpack } from 'unpacker';
import { flags } from '@/entrypoint/utils/targets';
import { SubtitleResult } from './types'; import { SubtitleResult } from './types';
import { makeEmbed } from '../../base'; import { makeEmbed } from '../../base';
import { Caption, getCaptionTypeFromUrl, labelToLanguageCode } from '../../captions'; import { Caption, getCaptionTypeFromUrl, labelToLanguageCode } from '../../captions';
@ -51,7 +53,7 @@ export const fileMoonScraper = makeEmbed({
id: 'primary', id: 'primary',
type: 'hls', type: 'hls',
playlist: file[1], playlist: file[1],
flags: [], flags: [flags.IP_LOCKED],
captions, captions,
}, },
], ],

View File

@ -1,3 +1,4 @@
import { flags } from '@/entrypoint/utils/targets';
import { NotFoundError } from '@/utils/errors'; import { NotFoundError } from '@/utils/errors';
import { makeEmbed } from '../../base'; import { makeEmbed } from '../../base';
@ -28,7 +29,7 @@ export const fileMoonMp4Scraper = makeEmbed({
url, url,
}, },
}, },
flags: [], flags: [flags.IP_LOCKED],
captions: result.stream[0].captions, captions: result.stream[0].captions,
}, },
], ],

View File

@ -1,3 +1,4 @@
import { flags } from '@/entrypoint/utils/targets';
import { makeEmbed } from '@/providers/base'; import { makeEmbed } from '@/providers/base';
import { Caption, getCaptionTypeFromUrl, labelToLanguageCode } from '@/providers/captions'; import { Caption, getCaptionTypeFromUrl, labelToLanguageCode } from '@/providers/captions';
@ -53,7 +54,7 @@ export const vidplayScraper = makeEmbed({
id: 'primary', id: 'primary',
type: 'hls', type: 'hls',
playlist: source, playlist: source,
flags: [], flags: [flags.PROXY_BLOCKED],
headers: { headers: {
Referer: url.origin, Referer: url.origin,
Origin: url.origin, Origin: url.origin,

View File

@ -1,5 +1,6 @@
import { load } from 'cheerio'; import { load } from 'cheerio';
import { flags } from '@/entrypoint/utils/targets';
import { SourcererEmbed, SourcererOutput, makeSourcerer } from '@/providers/base'; import { SourcererEmbed, SourcererOutput, makeSourcerer } from '@/providers/base';
import { MovieScrapeContext, ShowScrapeContext } from '@/utils/context'; import { MovieScrapeContext, ShowScrapeContext } from '@/utils/context';
@ -83,6 +84,6 @@ export const vidSrcToScraper = makeSourcerer({
name: 'VidSrcTo', name: 'VidSrcTo',
scrapeMovie: universalScraper, scrapeMovie: universalScraper,
scrapeShow: universalScraper, scrapeShow: universalScraper,
flags: [], flags: [flags.PROXY_BLOCKED],
rank: 130, rank: 130,
}); });