add preferredHeaders to vidplay

This commit is contained in:
Jorrin
2024-01-08 16:27:59 +01:00
parent e1f23f571d
commit 1dc7c879af
2 changed files with 7 additions and 1 deletions

View File

@@ -3,6 +3,7 @@ import { decodeData } from '@/providers/sources/vidsrcto/common';
import { EmbedScrapeContext } from '@/utils/context'; import { EmbedScrapeContext } from '@/utils/context';
export const vidplayBase = 'https://vidplay.site'; export const vidplayBase = 'https://vidplay.site';
export const referer = 'https://vidplay.online/';
// This file is based on https://github.com/Ciarands/vidsrc-to-resolver/blob/dffa45e726a4b944cb9af0c9e7630476c93c0213/vidsrc.py#L16 // This file is based on https://github.com/Ciarands/vidsrc-to-resolver/blob/dffa45e726a4b944cb9af0c9e7630476c93c0213/vidsrc.py#L16
// Full credits to @Ciarands! // Full credits to @Ciarands!

View File

@@ -1,7 +1,8 @@
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';
import { getFileUrl } from './common'; import { getFileUrl, referer } from './common';
import { SubtitleResult, VidplaySourceResponse } from './types'; import { SubtitleResult, VidplaySourceResponse } from './types';
export const vidplayScraper = makeEmbed({ export const vidplayScraper = makeEmbed({
@@ -46,6 +47,10 @@ export const vidplayScraper = makeEmbed({
playlist: source, playlist: source,
flags: [], flags: [],
captions, captions,
preferredHeaders: {
Referer: referer,
Origin: referer,
},
}, },
], ],
}; };